summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Kuleshov <kuleshovmail@gmail.com>2016-02-05 01:03:23 +0600
committerAlexander Kuleshov <kuleshovmail@gmail.com>2016-02-06 18:26:05 +0600
commit0345d252932acadc6d93ccfc24227fced2a69f03 (patch)
treea25372b28f644da4532cae38fa127ca92fab52a4 /src
parent6448e16d2102ecf38e25a2721f9f877638f4cb93 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/basic/time-util.c3
1 files changed, 1 insertions, 2 deletions
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)