]> git.ozlabs.org Git - ccan/commitdiff
strset: fix up tools for new ccan/time API.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 10 Jun 2014 06:24:31 +0000 (15:54 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 10 Jun 2014 06:24:31 +0000 (15:54 +0930)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/strset/tools/cbspeed.c
ccan/strset/tools/speed.c

index 9763efcbd88970ff9cd6d7b2973c195ce176a261..5d551b6e2c7fb54e1b58faff805aac0b2317e8b5 100644 (file)
@@ -381,17 +381,17 @@ return allprefixed_traverse(top,handle,arg);
 /* end critbit */
 
 /* Nanoseconds per operation */
-static size_t normalize(const struct timespec *start,
-                       const struct timespec *stop,
+static size_t normalize(const struct timeabs *start,
+                       const struct timeabs *stop,
                        unsigned int num)
 {
-       return time_to_nsec(time_divide(time_sub(*stop, *start), num));
+       return time_to_nsec(time_divide(time_between(*stop, *start), num));
 }
 
 int main(int argc, char *argv[])
 {
        size_t i, j, num;
-       struct timespec start, stop;
+       struct timeabs start, stop;
        critbit0_tree ct;
        char **words, **misswords;
 
index 972d52f760ff6995556623b38c474d715a7871c5..325b3a888d63e9787c99dd3103b76cb5936ec372 100644 (file)
 #include <sys/time.h>
 
 /* Nanoseconds per operation */
-static size_t normalize(const struct timespec *start,
-                       const struct timespec *stop,
+static size_t normalize(const struct timeabs *start,
+                       const struct timeabs *stop,
                        unsigned int num)
 {
-       return time_to_nsec(time_divide(time_sub(*stop, *start), num));
+       return time_to_nsec(time_divide(time_between(*stop, *start), num));
 }
 
 int main(int argc, char *argv[])
 {
        size_t i, j, num;
-       struct timespec start, stop;
+       struct timeabs start, stop;
        struct strset set;
        char **words, **misswords;