- fix timer Util_GetHPCTime precision issues

This commit is contained in:
Ilya Shurumov 2021-04-12 17:03:48 +06:00
parent 51b5e84f9a
commit 4cb68d8e54

View File

@ -33,7 +33,7 @@ double Util_GetHPCTime(timerCtx_t* timer, int reset)
gettimeofday(&curr, NULL); gettimeofday(&curr, NULL);
double value = (float(curr.tv_sec - timer->timeStart.tv_sec) + 0.000001f * float(curr.tv_usec - timer->timeStart.tv_usec)); double value = (double(curr.tv_sec - timer->timeStart.tv_sec) + double(curr.tv_usec - timer->timeStart.tv_usec) * 0.000001);
if (reset) if (reset)
timer->timeStart = curr; timer->timeStart = curr;