From 0345d252932acadc6d93ccfc24227fced2a69f03 Mon Sep 17 00:00:00 2001 From: Alexander Kuleshov Date: Fri, 5 Feb 2016 01:03:23 +0600 Subject: time-util: use dual_timestamp_get() The time-util.c provides dual_timestamp_get() function for getting realtime and monotonic timestamps. Let's use it instead of direct realtime/monotonic calculation. --- src/basic/time-util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/basic') diff --git a/src/basic/time-util.c b/src/basic/time-util.c index bfc7cf870c..293442cf0e 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -117,9 +117,8 @@ dual_timestamp* dual_timestamp_from_boottime_or_monotonic(dual_timestamp *ts, us ts->realtime = ts->monotonic = USEC_INFINITY; return ts; } - ts->realtime = now(CLOCK_REALTIME); - ts->monotonic = now(CLOCK_MONOTONIC); + dual_timestamp_get(ts); delta = (int64_t) now(clock_boottime_or_monotonic()) - (int64_t) u; if ((int64_t) ts->realtime > delta) -- cgit v1.2.3-54-g00ecf