Time delta function

allows movements to be adjusted for fps fluctuations