aboutsummaryrefslogtreecommitdiff
path: root/libbb/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/time.c')
-rw-r--r--libbb/time.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbb/time.c b/libbb/time.c
index 74a69eefb..cf5f2e5c8 100644
--- a/libbb/time.c
+++ b/libbb/time.c
@@ -291,19 +291,19 @@ unsigned FAST_FUNC monotonic_sec(void)
291unsigned long long FAST_FUNC monotonic_ns(void) 291unsigned long long FAST_FUNC monotonic_ns(void)
292{ 292{
293 struct timeval tv; 293 struct timeval tv;
294 gettimeofday(&tv, NULL); 294 xgettimeofday(&tv);
295 return tv.tv_sec * 1000000000ULL + tv.tv_usec * 1000; 295 return tv.tv_sec * 1000000000ULL + tv.tv_usec * 1000;
296} 296}
297unsigned long long FAST_FUNC monotonic_us(void) 297unsigned long long FAST_FUNC monotonic_us(void)
298{ 298{
299 struct timeval tv; 299 struct timeval tv;
300 gettimeofday(&tv, NULL); 300 xgettimeofday(&tv);
301 return tv.tv_sec * 1000000ULL + tv.tv_usec; 301 return tv.tv_sec * 1000000ULL + tv.tv_usec;
302} 302}
303unsigned long long FAST_FUNC monotonic_ms(void) 303unsigned long long FAST_FUNC monotonic_ms(void)
304{ 304{
305 struct timeval tv; 305 struct timeval tv;
306 gettimeofday(&tv, NULL); 306 xgettimeofday(&tv);
307 return tv.tv_sec * 1000ULL + tv.tv_usec / 1000; 307 return tv.tv_sec * 1000ULL + tv.tv_usec / 1000;
308} 308}
309unsigned FAST_FUNC monotonic_sec(void) 309unsigned FAST_FUNC monotonic_sec(void)