summaryrefslogtreecommitdiff
path: root/source4/lib/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/time.c')
-rw-r--r--source4/lib/time.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/time.c b/source4/lib/time.c
index e214179b6c..7a4059f646 100644
--- a/source4/lib/time.c
+++ b/source4/lib/time.c
@@ -402,6 +402,14 @@ struct timeval timeval_zero(void)
}
/*
+ return True if a timeval is zero
+*/
+BOOL timeval_is_zero(struct timeval *tv)
+{
+ return tv->tv_sec == 0 && tv->tv_usec == 0;
+}
+
+/*
return a timeval for the current time
*/
struct timeval timeval_current(void)