diff options
Diffstat (limited to 'lib/timeutils.c')
-rw-r--r-- | lib/timeutils.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/timeutils.c b/lib/timeutils.c index bd3d40248..b811041e4 100644 --- a/lib/timeutils.c +++ b/lib/timeutils.c @@ -340,26 +340,3 @@ int parse_timestamp(const char *t, usec_t *usec) return 0; } - - -int gettime_monotonic(struct timeval *tv) -{ -#ifdef CLOCK_MONOTONIC - /* Can slew only by ntp and adjtime */ - int ret; - struct timespec ts; - -# ifdef CLOCK_MONOTONIC_RAW - /* Linux specific, cant slew */ - if (!(ret = clock_gettime(CLOCK_MONOTONIC_RAW, &ts))) { -# else - if (!(ret = clock_gettime(CLOCK_MONOTONIC, &ts))) { -# endif - tv->tv_sec = ts.tv_sec; - tv->tv_usec = ts.tv_nsec / 1000; - } - return ret; -#else - return gettimeofday(tv, NULL); -#endif -} |