- Fix to timeval_add for remaining second in microseconds.

This commit is contained in:
W.C.A. Wijngaards
2019-08-01 16:48:41 +02:00
parent 199e6c586b
commit df0c844eed
8 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ perf_tv_add(struct timeval* t1, struct timeval* t2)
#ifndef S_SPLINT_S
t1->tv_sec += t2->tv_sec;
t1->tv_usec += t2->tv_usec;
while(t1->tv_usec > 1000000) {
while(t1->tv_usec >= 1000000) {
t1->tv_usec -= 1000000;
t1->tv_sec++;
}