Added frame time calculation