summaryrefslogtreecommitdiff
path: root/source3/lib/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/time.c')
-rw-r--r--source3/lib/time.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c
index faca2cba87..e63e0b2965 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -754,3 +754,9 @@ BOOL nt_time_is_zero(NTTIME *nt)
return True;
return False;
}
+
+SMB_BIG_INT usec_time_diff(struct timeval *larget, struct timeval *smallt)
+{
+ SMB_BIG_INT sec_diff = larget->tv_sec - smallt->tv_sec;
+ return (sec_diff * 1000000) + (SMB_BIG_INT)(larget->tv_usec - smallt->tv_usec);
+}