diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/time.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c index fad5d97cb1..eba358f11f 100644 --- a/source3/lib/time.c +++ b/source3/lib/time.c @@ -409,6 +409,10 @@ void round_timespec_to_usec(struct timespec *ts) { struct timeval tv = convert_timespec_to_timeval(*ts); *ts = convert_timeval_to_timespec(tv); + while (ts->tv_nsec > 1000000000) { + ts->tv_sec += 1; + ts->tv_nsec -= 1000000000; + } } /**************************************************************************** |