diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-06-22 20:52:23 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-06-22 20:52:23 +0200 |
commit | 1007ec60e664da03b7aea4803c643d991fcf6530 (patch) | |
tree | a807eba2bb2cf89a0228236844c1729deb3724bd /src/basic/time-util.h | |
parent | 54d8ef14d8ca92caa80c01bb6ebf09b5edb3df9d (diff) | |
download | systemd-1007ec60e664da03b7aea4803c643d991fcf6530.tar.gz |
time-util: add new call usec_shift_clock() for converting times between clocks
We use that quite often, let's implement one clean version of it.
Diffstat (limited to 'src/basic/time-util.h')
-rw-r--r-- | src/basic/time-util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/time-util.h b/src/basic/time-util.h index 8e2715cf68..414995e6af 100644 --- a/src/basic/time-util.h +++ b/src/basic/time-util.h @@ -145,6 +145,8 @@ bool clock_boottime_supported(void); bool clock_supported(clockid_t clock); clockid_t clock_boottime_or_monotonic(void); +usec_t usec_shift_clock(usec_t, clockid_t from, clockid_t to); + #define xstrftime(buf, fmt, tm) \ assert_message_se(strftime(buf, ELEMENTSOF(buf), fmt, tm) > 0, \ "xstrftime: " #buf "[] must be big enough") |