Fix benchmark warning
This commit is contained in:
parent
12947c74d0
commit
b70c239b2c
1 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
unsigned long unixtime() {
|
unsigned long unixtime() {
|
||||||
struct timeval tp;
|
struct timeval tp;
|
||||||
if (gettimeofday((struct timeval *) &tp, (NUL)) == 0) {
|
if (gettimeofday((struct timeval *) &tp, (NULL)) == 0) {
|
||||||
return tp.tv_sec;
|
return tp.tv_sec;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -30,7 +30,7 @@ double microtime() {
|
||||||
struct timeval tp;
|
struct timeval tp;
|
||||||
long sec = 0L;
|
long sec = 0L;
|
||||||
double msec = 0.0;
|
double msec = 0.0;
|
||||||
if (gettimeofday((struct timeval *) &tp, (NUL)) == 0) {
|
if (gettimeofday((struct timeval *) &tp, (NULL)) == 0) {
|
||||||
msec = (double) (tp.tv_usec / MICRO_IN_SEC);
|
msec = (double) (tp.tv_usec / MICRO_IN_SEC);
|
||||||
sec = tp.tv_sec;
|
sec = tp.tv_sec;
|
||||||
if (msec >= 1.0)
|
if (msec >= 1.0)
|
||||||
|
|
Loading…
Reference in a new issue