Calculate time according to distance in MovinState and MovingWithProductState.