chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6973c59
)
bug in timer, thanks to William Vaughn for the patch
author
stevenj
<stevenj@alum.mit.edu>
Tue, 15 Nov 2011 23:07:34 +0000
(18:07 -0500)
committer
stevenj
<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
patch
|
blob
|
history
diff --git
a/util/timer.c
b/util/timer.c
index 7762b2b0910c91db346ef602d3168176db3b3cc3..99fa34476c179dd495b40bdff3528dd77a57ff04 100644
(file)
--- 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_
u
sec);
#elif defined(HAVE_TIME)
return time(NULL);
#elif defined(_WIN32) || defined(__WIN32__)