From c4b864ccd2a51fcb547a0dde27c261172b564474 Mon Sep 17 00:00:00 2001 From: stevenj Date: Tue, 15 Nov 2011 18:07:34 -0500 Subject: [PATCH] bug in timer, thanks to William Vaughn for the patch Ignore-this: 80c91b13714b274d94f7a14bc2792a0 darcs-hash:20111115230734-c8de0-b84fa13e892b3f30f272ff2fd552aca2e5207151.gz --- util/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/timer.c b/util/timer.c index 7762b2b..99fa344 100644 --- a/util/timer.c +++ b/util/timer.c @@ -49,7 +49,7 @@ double nlopt_seconds(void) gettimeofday(&start, NULL); } gettimeofday(&tv, NULL); - return (tv.tv_sec - start.tv_sec) + 1.e-6 * (tv.tv_usec - start.tv_sec); + return (tv.tv_sec - start.tv_sec) + 1.e-6 * (tv.tv_usec - start.tv_usec); #elif defined(HAVE_TIME) return time(NULL); #elif defined(_WIN32) || defined(__WIN32__) -- 2.30.2