From baf9ee660c9f1d44d64341e225f9e0d7b808424d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 9 Aug 2024 23:20:06 -0400 Subject: xtime: Remove xgettime() clock_gettime() is available everywhere by now. --- src/xtime.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/xtime.c') diff --git a/src/xtime.c b/src/xtime.c index 186651b..df8fd61 100644 --- a/src/xtime.c +++ b/src/xtime.c @@ -350,17 +350,3 @@ invalid: error: return -1; } - -int xgettime(struct timespec *result) { -#if _POSIX_TIMERS > 0 - return clock_gettime(CLOCK_REALTIME, result); -#else - struct timeval tv; - int ret = gettimeofday(&tv, NULL); - if (ret == 0) { - result->tv_sec = tv.tv_sec; - result->tv_nsec = tv.tv_usec * 1000L; - } - return ret; -#endif -} -- cgit v1.2.3