summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-08-30 15:30:16 +0200
committerBjörn Jacke <bj@sernet.de>2010-08-31 10:25:59 +0200
commit6e9747c1ce4806c0b81400f2627579e0bbf95207 (patch)
tree52f10c1a5c9fb2110ff84e372f7aa0eeb035e061
parent4b09919f70b171bc6e053bc3014ffc0e36bc1ff1 (diff)
downloadsamba-6e9747c1ce4806c0b81400f2627579e0bbf95207.tar.gz
samba-6e9747c1ce4806c0b81400f2627579e0bbf95207.tar.bz2
samba-6e9747c1ce4806c0b81400f2627579e0bbf95207.zip
s3: add TspecDiff macro
-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
****************************************************************************/