Added a method for measuring milliseconds and implemented smooth player movement