From a125e49d6740c44a36e6d5a1af33700163a11e95 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 8 Jun 2004 19:25:26 +0000 Subject: 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) --- source4/lib/time.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/lib/time.c') 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); +} + -- cgit