summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-02-08 12:55:02 +0100
committerVolker Lendecke <vlendec@samba.org>2011-02-28 16:40:19 +0100
commit5e93e3e88fb4a219492c23c18067f358b54311d0 (patch)
tree7d7171d86e36bd40f9097ee070cb764fe7dd0fe5 /source3/lib
parent9bfbf652b02f4e0f96854c912c11e679417c8e2c (diff)
downloadsamba-5e93e3e88fb4a219492c23c18067f358b54311d0.tar.gz
samba-5e93e3e88fb4a219492c23c18067f358b54311d0.tar.bz2
samba-5e93e3e88fb4a219492c23c18067f358b54311d0.zip
s3: Add timeval_to_msec
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c5
1 files changed, 5 insertions, 0 deletions
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;
+}