diff options
Diffstat (limited to 'tests/libntp/timespecops.c')
-rw-r--r-- | tests/libntp/timespecops.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/libntp/timespecops.c b/tests/libntp/timespecops.c index 741b1adfe782f..01617da0a28a0 100644 --- a/tests/libntp/timespecops.c +++ b/tests/libntp/timespecops.c @@ -132,7 +132,8 @@ AssertFpClose(const l_fp m, const l_fp n, const l_fp limit) return TRUE; } else { - printf("m_expr which is %s \nand\nn_expr which is %s\nare not close; diff=%susec\n", lfptoa(&m, 10), lfptoa(&n, 10), lfptoa(&diff, 10)); + printf("m_expr which is %s \nand\nn_expr which is %s\nare not close; diff=%susec\n", + lfptoa(&m, 10), lfptoa(&n, 10), lfptoa(&diff, 10)); return FALSE; } } @@ -147,11 +148,13 @@ AssertTimespecClose(const struct timespec m, const struct timespec n, diff = abs_tspec(sub_tspec(m, n)); if (cmp_tspec(limit, diff) >= 0) return TRUE; - else - { - printf("m_expr which is %ld.%lu \nand\nn_expr which is %ld.%lu\nare not close; diff=%ld.%lunsec\n", m.tv_sec, m.tv_nsec, n.tv_sec, n.tv_nsec, diff.tv_sec, diff.tv_nsec); - return FALSE; - } + + printf("m_expr which is %lld.%09lu \nand\n" + "n_expr which is %lld.%09lu\nare not close; diff=%lld.%09lunsec\n", + (long long)m.tv_sec, m.tv_nsec, + (long long)n.tv_sec, n.tv_nsec, + (long long)diff.tv_sec, diff.tv_nsec); + return FALSE; } //----------------------------------------------- |