diff options
author | Alexander Kuleshov <kuleshovmail@gmail.com> | 2016-02-05 01:03:23 +0600 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-05-17 15:22:16 +0200 |
commit | efd35b9f3dcb9b08e991d56a686d41088e15841c (patch) | |
tree | b1b15d925306c58a7b9aa7e72beff9bf7e1bfc9d | |
parent | 69039ad66f42e4314977b5835b308e4136f59734 (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.
-rw-r--r-- | src/basic/time-util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/basic/time-util.c b/src/basic/time-util.c index 34061fea9..28b20f418 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -112,9 +112,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) |