git.samba.org
/
kai
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2840902
)
Use existing time_t rounding function, don't invent my own.
author
Jeremy Allison
<jra@samba.org>
Mon, 24 Aug 2009 22:09:29 +0000
(15:09 -0700)
committer
Jeremy Allison
<jra@samba.org>
Mon, 24 Aug 2009 22:09:29 +0000
(15:09 -0700)
Jeremy.
source3/lib/time.c
patch
|
blob
|
history
diff --git
a/source3/lib/time.c
b/source3/lib/time.c
index c80b59a662f77f39bdd9eeccf39fc4ba187df92a..a9f7899c7bda078756a4bc84ce7149f0cdbf5d9a 100644
(file)
--- a/
source3/lib/time.c
+++ b/
source3/lib/time.c
@@
-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;
}