projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c54be90
)
tests: show current monotonic/boottime/realtime clock values in test-time
author
Lennart Poettering
<lennart@poettering.net>
Thu, 22 Jun 2017 19:10:34 +0000
(21:10 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 22 Jun 2017 19:10:34 +0000
(21:10 +0200)
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.
src/test/test-time.c
patch
|
blob
|
history
diff --git
a/src/test/test-time.c
b/src/test/test-time.c
index
d9a6d61
..
601e835
100644
(file)
--- 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();