summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/util/time.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/util/time.c b/lib/util/time.c
index 56b2ec50de..bc87120859 100644
--- a/lib/util/time.c
+++ b/lib/util/time.c
@@ -69,19 +69,12 @@ _PUBLIC_ void clock_gettime_mono(struct timespec *tp)
/**
a wrapper to preferably get the monotonic time in seconds
-as this is only second resolution we can use the cached
-(and much faster) COARSE clock variant
**/
_PUBLIC_ time_t time_mono(time_t *t)
{
struct timespec tp;
- int rc = -1;
-#ifdef CLOCK_MONOTONIC_COARSE
- rc = clock_gettime(CLOCK_MONOTONIC_COARSE,&tp);
-#endif
- if (rc != 0) {
- clock_gettime_mono(&tp);
- }
+
+ clock_gettime_mono(&tp);
if (t != NULL) {
*t = tp.tv_sec;
}