commit 87a63caa62621077b10e1b0b5ddcb2ba84e794b3
parent a1badb49b858c335fc5c92fef1762ccfc18796d0
Author: vaplv <vaplv@free.fr>
Date: Tue, 28 Jan 2014 12:37:42 +0100
Minor modifications of the clock_time test
Diffstat:
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/test_time.c b/src/test_time.c
@@ -1,13 +1,5 @@
#include "clock_time.h"
-
#include <stdlib.h>
-#include <unistd.h>
-
-static FINLINE int64_t
-absi64(const int64_t i)
-{
- return i < 0 ? -i : i;
-}
int
main(int argc, char** argv)
@@ -25,9 +17,9 @@ main(int argc, char** argv)
time_sub(&res, &end, &start);
time = time_val(&res, TIME_NSEC);
CHECK(time > 0, 1 );
- CHECK( time_val(&res, TIME_USEC), time / 1000 );
- CHECK( time_val(&res, TIME_MSEC), time / 1000000 );
- CHECK( time_val(&res, TIME_SEC), time / 1000000000 );
+ CHECK(time_val(&res, TIME_USEC), time / 1000);
+ CHECK(time_val(&res, TIME_MSEC), time / 1000000);
+ CHECK(time_val(&res, TIME_SEC), time / 1000000000);
time_dump
(&res, TIME_SEC|TIME_MSEC|TIME_USEC|TIME_NSEC, NULL, dump, sizeof(dump));