mirror of
https://github.com/mpv-player/mpv
synced 2025-03-24 12:22:25 +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 */
|
/* current time in microseconds */
|
||||||
unsigned int GetTimer()
|
unsigned int GetTimer()
|
||||||
{
|
{
|
||||||
return (unsigned int)((mach_absolute_time() * timebase_ratio - startup_time)
|
return (unsigned int)(uint64_t)((mach_absolute_time() * timebase_ratio - startup_time) * 1e6);
|
||||||
* 1e6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* current time in milliseconds */
|
/* current time in milliseconds */
|
||||||
unsigned int GetTimerMS()
|
unsigned int GetTimerMS()
|
||||||
{
|
{
|
||||||
return (unsigned int)((mach_absolute_time() * timebase_ratio - startup_time)
|
return (unsigned int)(uint64_t)((mach_absolute_time() * timebase_ratio - startup_time) * 1e3);
|
||||||
* 1e3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* time spent between now and last call in seconds */
|
/* time spent between now and last call in seconds */
|
||||||
|
Loading…
Reference in New Issue
Block a user