summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/smb_macros.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 757c8a2c1e..e72f2aab68 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -153,6 +153,15 @@ values
(((tvalnew)->tv_sec - (tvalold)->tv_sec)*1000 + \
((int)(tvalnew)->tv_usec - (int)(tvalold)->tv_usec)/1000)
+/*******************************************************************
+find the difference in milliseconds between two struct timespec
+values
+********************************************************************/
+
+#define TspecDiff(tvalold,tvalnew) \
+ (((tvalnew)->tv_sec - (tvalold)->tv_sec)*1000 + \
+ ((int)(tvalnew)->tv_nsec - (int)(tvalold)->tv_nsec)/1000000)
+
/****************************************************************************
true if two IPv4 addresses are equal
****************************************************************************/