A rocket ship in space is at rest relative to a rock floating in deep space. The rocket ship accelerates away from the rock at 3 m/s^2, while it accelerates it goes through a displacement of 108 m directly away from the rock. For what amount of time did it accelerate?