What is time dilation ?
It is important to note that time dilation is relative to the perspective of the observer. In other words, if you were to travel in the spaceship with the clock, you would notice no time dilation. Everything would seem normal to you. From your perspective, the beams of light would be traveling back and forth between the mirrors just as if you were sitting still. However, from a stationary perspective, time slows down. In other words, only the stationary observer observes time dilation in the moving ship.