From: Lennart Poettering Date: Thu, 22 Jun 2017 19:10:34 +0000 (+0200) Subject: tests: show current monotonic/boottime/realtime clock values in test-time X-Git-Tag: v234~108^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6176%2Fhead;p=thirdparty%2Fsystemd.git tests: show current monotonic/boottime/realtime clock values in test-time When debugging time issues its kinda handy to have an easy way to query the three clocks, hence let's just output them at the beginning of test-time. --- diff --git a/src/test/test-time.c b/src/test/test-time.c index d9a6d612f2b..601e835f16b 100644 --- a/src/test/test-time.c +++ b/src/test/test-time.c @@ -372,6 +372,13 @@ static void test_usec_shift_clock(void) { int main(int argc, char *argv[]) { uintmax_t x; + log_info("realtime=" USEC_FMT "\n" + "monotonic=" USEC_FMT "\n" + "boottime=" USEC_FMT "\n", + now(CLOCK_REALTIME), + now(CLOCK_MONOTONIC), + now(clock_boottime_or_monotonic())); + test_parse_sec(); test_parse_time(); test_parse_nsec();