From 6e9747c1ce4806c0b81400f2627579e0bbf95207 Mon Sep 17 00:00:00 2001 From: Björn Jacke Date: Mon, 30 Aug 2010 15:30:16 +0200 Subject: s3: add TspecDiff macro --- source3/include/smb_macros.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/include') 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 ****************************************************************************/ -- cgit