]> git.ozlabs.org Git - ccan/blobdiff - ccan/htable/tools/hsearchspeed.c
htable: update tools for time changes.
[ccan] / ccan / htable / tools / hsearchspeed.c
index 6a8c62fc10676e5ddfb35482599ec6541bb4e2ba..88280114f3842f432170782b49b801146c035495 100644 (file)
 #include <search.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;
        char **w;
        ENTRY *words, *misswords;