From 1e84773276ede56309a145dc08a4f3d47ad3a29f Mon Sep 17 00:00:00 2001 From: Bert Date: Fri, 2 Sep 2011 04:33:44 +0200 Subject: Data driven timeout handling --- util.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'util.h') diff --git a/util.h b/util.h index a891054..19ebcd7 100644 --- a/util.h +++ b/util.h @@ -33,7 +33,12 @@ #define MSEC_TO_TIMEVAL(t,tv) { \ (tv)->tv_sec = (t) / 1000; \ - (tv)->tv_usec = (t) % 1000 * 1000; \ + (tv)->tv_usec = (t) % 1000 * 1000; \ +} + +#define MSEC_ADD_TO_TIMEVAL(t,tv) { \ + (tv)->tv_sec += (t) / 1000; \ + (tv)->tv_usec += (t) % 1000 * 1000; \ } #ifndef TIMESPEC_TO_TIMEVAL @@ -60,8 +65,6 @@ char* s_strdup(char*); void warn(const char*, ...); void die(const char*, ...); -int min_int_nz(int, ...); - void size_readable(float*, const char**); char* absolute_path(const char*); -- cgit v1.2.3