more precise time calculation