mirror of
https://github.com/mpv-player/mpv
synced 2025-03-22 11:18:32 +00:00
Force to uint64_t first to avoid direct conversion from double to unsigned int.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26582 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d4f42c4d46
commit
d90a7e0283
@ -54,15 +54,13 @@ int usec_sleep(int usec_delay)
|
||||
/* current time in microseconds */
|
||||
unsigned int GetTimer()
|
||||
{
|
||||
return (unsigned int)((mach_absolute_time() * timebase_ratio - startup_time)
|
||||
* 1e6);
|
||||
return (unsigned int)(uint64_t)((mach_absolute_time() * timebase_ratio - startup_time) * 1e6);
|
||||
}
|
||||
|
||||
/* current time in milliseconds */
|
||||
unsigned int GetTimerMS()
|
||||
{
|
||||
return (unsigned int)((mach_absolute_time() * timebase_ratio - startup_time)
|
||||
* 1e3);
|
||||
return (unsigned int)(uint64_t)((mach_absolute_time() * timebase_ratio - startup_time) * 1e3);
|
||||
}
|
||||
|
||||
/* time spent between now and last call in seconds */
|
||||
|
Loading…
Reference in New Issue
Block a user