return ts;
}
-static usec_t map_clock_usec_internal(usec_t from, usec_t from_base, usec_t to_base) {
+usec_t map_clock_usec_raw(usec_t from, usec_t from_base, usec_t to_base) {
/* Maps the time 'from' between two clocks, based on a common reference point where the first clock
* is at 'from_base' and the second clock at 'to_base'. Basically calculates:
if (from == USEC_INFINITY)
return from;
- return map_clock_usec_internal(from, now(from_clock), now(to_clock));
+ return map_clock_usec_raw(from, now(from_clock), now(to_clock));
}
dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u) {
nowr = now(CLOCK_REALTIME);
ts->realtime = u;
- ts->monotonic = map_clock_usec_internal(u, nowr, now(CLOCK_MONOTONIC));
- ts->boottime = map_clock_usec_internal(u, nowr, now(CLOCK_BOOTTIME));
+ ts->monotonic = map_clock_usec_raw(u, nowr, now(CLOCK_MONOTONIC));
+ ts->boottime = map_clock_usec_raw(u, nowr, now(CLOCK_BOOTTIME));
return ts;
}
nowb = now(CLOCK_BOOTTIME);
ts->boottime = u;
- ts->monotonic = map_clock_usec_internal(u, nowb, now(CLOCK_MONOTONIC));
- ts->realtime = map_clock_usec_internal(u, nowb, now(CLOCK_REALTIME));
+ ts->monotonic = map_clock_usec_raw(u, nowb, now(CLOCK_MONOTONIC));
+ ts->realtime = map_clock_usec_raw(u, nowb, now(CLOCK_REALTIME));
return ts;
}
}
nowm = now(CLOCK_BOOTTIME);
- ts->monotonic = map_clock_usec_internal(u, nowm, now(CLOCK_MONOTONIC));
- ts->realtime = map_clock_usec_internal(u, nowm, now(CLOCK_REALTIME));
+ ts->monotonic = map_clock_usec_raw(u, nowm, now(CLOCK_MONOTONIC));
+ ts->realtime = map_clock_usec_raw(u, nowm, now(CLOCK_REALTIME));
return ts;
}