Assume that you are moving at some distance v(t), where v(t) > 0 for all t >= 0. Then you will reach the end of the finite room at time t1 when the distance from the room is equal to the integral of v(t) from 0 to t1. Of course, this can easily be proved if v(t) is increasing monotonely...