diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2014-06-10 15:54:31 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-06-10 15:54:31 +0930 |
commit | 31bf658f422cedf13a7a568132f1cdadcc4432c4 (patch) | |
tree | a8dc076b22b71aa4489dd58bd0ed2d0721e960c2 | |
parent | 483c7c963a1b6fd54c21f75434e22dfc88aac9ee (diff) |
strset: fix up tools for new ccan/time API.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | ccan/strset/tools/cbspeed.c | 8 | ||||
-rw-r--r-- | ccan/strset/tools/speed.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/ccan/strset/tools/cbspeed.c b/ccan/strset/tools/cbspeed.c index 9763efcb..5d551b6e 100644 --- a/ccan/strset/tools/cbspeed.c +++ b/ccan/strset/tools/cbspeed.c @@ -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; diff --git a/ccan/strset/tools/speed.c b/ccan/strset/tools/speed.c index 972d52f7..325b3a88 100644 --- a/ccan/strset/tools/speed.c +++ b/ccan/strset/tools/speed.c @@ -32,17 +32,17 @@ #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; |