1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

Fixing timeval calculation

The code was always doubling microseconds when attempting to round up.
This commit is contained in:
Simo Sorce 2009-09-25 10:59:04 -04:00
parent 014a3a9926
commit 76d836570e

View File

@ -114,7 +114,7 @@ struct timeval tevent_timeval_add(const struct timeval *tv, uint32_t secs,
tv2.tv_sec += secs;
tv2.tv_usec += usecs;
tv2.tv_sec += tv2.tv_usec / 1000000;
tv2.tv_usec += tv2.tv_usec % 1000000;
tv2.tv_usec = tv2.tv_usec % 1000000;
return tv2;
}