summaryrefslogtreecommitdiffstats
path: root/lib/timeutils.c
diff options
context:
space:
mode:
authorKarel Zak2014-11-19 11:54:47 +0100
committerKarel Zak2014-11-19 11:54:47 +0100
commitcd2876d252215fb3fbe46f787cb37cd4fbd64e53 (patch)
tree8b12443080179b8e99a010b88b0446c061711e66 /lib/timeutils.c
parentbuild-sys: use CLOCKGETTIME_LIBS (diff)
downloadkernel-qcow2-util-linux-cd2876d252215fb3fbe46f787cb37cd4fbd64e53.tar.gz
kernel-qcow2-util-linux-cd2876d252215fb3fbe46f787cb37cd4fbd64e53.tar.xz
kernel-qcow2-util-linux-cd2876d252215fb3fbe46f787cb37cd4fbd64e53.zip
build-sys: move all around clock_gettime() to monotonic.c
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib/timeutils.c')
-rw-r--r--lib/timeutils.c23
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
-}