summaryrefslogtreecommitdiff
path: root/lib/util/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util/time.c')
-rw-r--r--lib/util/time.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/util/time.c b/lib/util/time.c
index bd067f84e8e..3a6043025f4 100644
--- a/lib/util/time.c
+++ b/lib/util/time.c
@@ -957,6 +957,15 @@ void round_timespec_to_usec(struct timespec *ts)
}
/****************************************************************************
+ Round a timespec to NTTIME resolution.
+****************************************************************************/
+
+void round_timespec_to_nttime(struct timespec *ts)
+{
+ ts->tv_nsec = (ts->tv_nsec / 100) * 100;
+}
+
+/****************************************************************************
Put a 8 byte filetime from a struct timespec. Uses GMT.
****************************************************************************/