X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fhtable%2Ftools%2Fstringspeed.c;h=c6ca10f523aed5f9c7cefc71c55606a744fbf5cd;hp=bd67f2814945f7f16143235f6bd3d17061700eb7;hb=HEAD;hpb=a2cb9a4f7f46effe1fdca5c05c3e0dfb6b3cc02a diff --git a/ccan/htable/tools/stringspeed.c b/ccan/htable/tools/stringspeed.c index bd67f281..c6ca10f5 100644 --- a/ccan/htable/tools/stringspeed.c +++ b/ccan/htable/tools/stringspeed.c @@ -34,17 +34,17 @@ static bool cmp(const char *obj, const char *key) HTABLE_DEFINE_TYPE(char, strkey, hash_str, cmp, htable_str); /* 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 htable_str ht; char **words, **misswords;