Implement deltaTime calculation