From 5e93e3e88fb4a219492c23c18067f358b54311d0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 8 Feb 2011 12:55:02 +0100 Subject: s3: Add timeval_to_msec --- source3/lib/util.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/lib') diff --git a/source3/lib/util.c b/source3/lib/util.c index 99c4200eb3..81d2a78d3c 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2940,3 +2940,8 @@ bool any_nt_status_not_ok(NTSTATUS err1, NTSTATUS err2, NTSTATUS *result) } return false; } + +int timeval_to_msec(struct timeval t) +{ + return t.tv_sec * 1000 + (t.tv_usec+999) / 1000; +} -- cgit