os: Actually use the computed clockid in GetTimeInMicros
The selection of which clock to use for this function was not actually getting used when fetching the final clock value. Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
903a058370
commit
5f1e832694
|
@ -480,7 +480,7 @@ GetTimeInMicros(void)
|
||||||
else
|
else
|
||||||
clockid = ~0L;
|
clockid = ~0L;
|
||||||
}
|
}
|
||||||
if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
|
if (clockid != ~0L && clock_gettime(clockid, &tp) == 0)
|
||||||
return (CARD64) tp.tv_sec * (CARD64)1000000 + tp.tv_nsec / 1000;
|
return (CARD64) tp.tv_sec * (CARD64)1000000 + tp.tv_nsec / 1000;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user