diff options
author | Björn Jacke <bj@sernet.de> | 2010-08-30 15:30:16 +0200 |
---|---|---|
committer | Björn Jacke <bj@sernet.de> | 2010-08-31 10:25:59 +0200 |
commit | 6e9747c1ce4806c0b81400f2627579e0bbf95207 (patch) | |
tree | 52f10c1a5c9fb2110ff84e372f7aa0eeb035e061 | |
parent | 4b09919f70b171bc6e053bc3014ffc0e36bc1ff1 (diff) | |
download | samba-6e9747c1ce4806c0b81400f2627579e0bbf95207.tar.gz samba-6e9747c1ce4806c0b81400f2627579e0bbf95207.tar.xz samba-6e9747c1ce4806c0b81400f2627579e0bbf95207.zip |
s3: add TspecDiff macro
-rw-r--r-- | source3/include/smb_macros.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index 757c8a2c1e7..e72f2aab68c 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 ****************************************************************************/ |