mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
Use existing time_t rounding function, don't invent my own.
Jeremy.
This commit is contained in:
parent
2840902692
commit
7a6c979299
@ -474,7 +474,7 @@ int timespec_compare(const struct timespec *ts1, const struct timespec *ts2)
|
||||
|
||||
void round_timespec(struct timespec *ts)
|
||||
{
|
||||
ts->tv_sec += ts->tv_nsec >= 500000000 ? 1 : 0;
|
||||
ts->tv_sec = convert_timespec_to_time_t(*ts);
|
||||
ts->tv_nsec = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user