fix birarda's stupid bug in timestamp creation

This commit is contained in:
Stephen Birarda 2013-02-25 15:19:53 -08:00 committed by stojce
parent eb37d1fbf8
commit 82435582a8

View file

@ -9,11 +9,11 @@
#include "SharedUtil.h"
double usecTimestamp(timeval *time) {
return (time->tv_sec * 1000000.0);
return (time->tv_sec * 1000000.0 + time->tv_usec);
}
double usecTimestampNow() {
timeval now;
gettimeofday(&now, NULL);
return (now.tv_sec * 1000000.0);
return (now.tv_sec * 1000000.0 + now.tv_usec);
}