From 37d6c7f23fd44283d1853141d39ecc3f3a2c54e6 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 28 Mar 2011 21:00:38 +0400 Subject: * Add more timeouts: for fuzzy operations, for worker task operations Handle miliseconds using a common macro. --- src/util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 2ba01d05e..f4eea0bd6 100644 --- a/src/util.h +++ b/src/util.h @@ -173,4 +173,9 @@ const gchar * process_to_str (enum process_type type); */ enum process_type str_to_process (const gchar *str); +/* + * Convert milliseconds to timeval fields + */ +#define msec_to_tv(msec, tv) do { (tv)->tv_sec = (msec) / 1000; (tv)->tv_usec = ((msec) - (tv)->tv_sec * 1000) * 1000; } while(0) + #endif -- cgit v1.2.3