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:
parent
014a3a9926
commit
76d836570e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user