Commit 31bf658f authored by Rusty Russell's avatar Rusty Russell

strset: fix up tools for new ccan/time API.

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 483c7c96
...@@ -381,17 +381,17 @@ return allprefixed_traverse(top,handle,arg); ...@@ -381,17 +381,17 @@ return allprefixed_traverse(top,handle,arg);
/* end critbit */ /* end critbit */
/* Nanoseconds per operation */ /* Nanoseconds per operation */
static size_t normalize(const struct timespec *start, static size_t normalize(const struct timeabs *start,
const struct timespec *stop, const struct timeabs *stop,
unsigned int num) 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[]) int main(int argc, char *argv[])
{ {
size_t i, j, num; size_t i, j, num;
struct timespec start, stop; struct timeabs start, stop;
critbit0_tree ct; critbit0_tree ct;
char **words, **misswords; char **words, **misswords;
......
...@@ -32,17 +32,17 @@ ...@@ -32,17 +32,17 @@
#include <sys/time.h> #include <sys/time.h>
/* Nanoseconds per operation */ /* Nanoseconds per operation */
static size_t normalize(const struct timespec *start, static size_t normalize(const struct timeabs *start,
const struct timespec *stop, const struct timeabs *stop,
unsigned int num) 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[]) int main(int argc, char *argv[])
{ {
size_t i, j, num; size_t i, j, num;
struct timespec start, stop; struct timeabs start, stop;
struct strset set; struct strset set;
char **words, **misswords; char **words, **misswords;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment