chiark / gitweb /
bug in timer, thanks to William Vaughn for the patch
authorstevenj <stevenj@alum.mit.edu>
Tue, 15 Nov 2011 23:07:34 +0000 (18:07 -0500)
committerstevenj <stevenj@alum.mit.edu>
Tue, 15 Nov 2011 23:07:34 +0000 (18:07 -0500)
Ignore-this: 80c91b13714b274d94f7a14bc2792a0

darcs-hash:20111115230734-c8de0-b84fa13e892b3f30f272ff2fd552aca2e5207151.gz

util/timer.c

index 7762b2b0910c91db346ef602d3168176db3b3cc3..99fa34476c179dd495b40bdff3528dd77a57ff04 100644 (file)
@@ -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__)