提交 c4b864cc 编写于 作者: S stevenj

bug in timer, thanks to William Vaughn for the patch

Ignore-this: 80c91b13714b274d94f7a14bc2792a0

darcs-hash:20111115230734-c8de0-b84fa13e892b3f30f272ff2fd552aca2e5207151.gz
上级 6973c59f
......@@ -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__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册