From 0204ae6229bae3573b3194c3f657c8f385c0b940 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 1 Jun 2011 11:24:51 +0930 Subject: lib/util/time.c: timeval_current_ofs_usec Several places want "microseconds from current time", and several were simply handing "usecs" values which could be over a million. Using a helper to do this is safer and more readable. I didn't replace any obviously correct callers (ie. constants). I also renamed wait_nsec in source3/lib/util_sock.c; it's actually microseconds not nanoseconds (introduced with this code in Volker's 19b783cc Async wrapper for open_socket_out_send/recv). Signed-off-by: Rusty Russell --- source4/libcli/raw/clitransport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/raw/clitransport.c') diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index 7a3993c79b..43316692a4 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -338,7 +338,7 @@ _PUBLIC_ void smbcli_transport_idle_handler(struct smbcli_transport *transport, transport->socket->event.te = event_add_timed(transport->socket->event.ctx, transport, - timeval_current_ofs(0, period), + timeval_current_ofs_usec(period), idle_handler, transport); } -- cgit