diff options
author | Julien Cristau <jcristau@debian.org> | 2013-11-05 07:08:21 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-11-05 08:06:09 -0800 |
commit | 5f1e832694e57986c0185048a941b3af51b2f85f (patch) | |
tree | 47fcfb8d074cf986f05ce859ea133c384fe728cb /os | |
parent | 903a058370645ea075ea98d380fd565efb6160c9 (diff) |
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>
Diffstat (limited to 'os')
-rw-r--r-- | os/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/os/utils.c b/os/utils.c index 995f62a37..fb20da755 100644 --- a/os/utils.c +++ b/os/utils.c @@ -480,7 +480,7 @@ GetTimeInMicros(void) else 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; #endif |