1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-21 05:57:34 +03:00

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.
This commit is contained in:
Lennart Poettering 2017-06-22 21:10:34 +02:00
parent c54be90b28
commit c4834ffaef

View File

@ -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();