time-util: introduce usec_sub()
authorAlexander Kuleshov <kuleshovmail@gmail.com>
Thu, 4 Feb 2016 18:02:39 +0000 (00:02 +0600)
committerAlexander Kuleshov <kuleshovmail@gmail.com>
Mon, 8 Feb 2016 19:15:17 +0000 (01:15 +0600)
commit5d634ca8cefb3d738d9efa70dfcc2f67d85d99e9
treeca648a970230dd03b23c976e055daa0a76c3efac
parentef9fde5378c0b2614991f9e3c4ac525cc07736a8
time-util: introduce usec_sub()

The dual_timestamp_from_realtime(), dual_timestamp_from_monotonic()
and dual_timestamp_from_boottime_or_monotonic() shares the same
code for comparison given ts with delta. Let's move it to the
separate inline function to prevent code duplication.
src/basic/time-util.c
src/basic/time-util.h