1
0
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:
Jeremy Allison 2009-08-24 15:09:29 -07:00
parent 2840902692
commit 7a6c979299

View File

@ -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;
}