summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-06-08 19:25:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:37 -0500
commita125e49d6740c44a36e6d5a1af33700163a11e95 (patch)
tree7b0d8ab816568e942255b9466ca4e7ae17811a56 /source4/lib
parenteaae8b6f5f21c758db90a1008e91967fcfbc3513 (diff)
downloadsamba-a125e49d6740c44a36e6d5a1af33700163a11e95.tar.gz
samba-a125e49d6740c44a36e6d5a1af33700163a11e95.tar.bz2
samba-a125e49d6740c44a36e6d5a1af33700163a11e95.zip
r1086: Add defer open test to check timeout on sharing violation open.
This has found some signing errors in the Samba3.0 implementation of the deferred open code. Still working on these... Jeremy (This used to be commit 0068cb12ef91515a95f17a1be7dfbc83fbb89eba)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/time.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/lib/time.c b/source4/lib/time.c
index dbbfab24b5..9d906af2fa 100644
--- a/source4/lib/time.c
+++ b/source4/lib/time.c
@@ -409,3 +409,10 @@ NTTIME nttime_from_string(const char *s)
{
return strtoull(s, NULL, 0);
}
+
+long long usec_time_diff(struct timeval *larget, struct timeval *smallt)
+{
+ long long sec_diff = larget->tv_sec - smallt->tv_sec;
+ return (sec_diff * 1000000) + (long long)(larget->tv_usec - smallt->tv_usec);
+}
+