From 22d4e991d5726ca034924fa697a32a42578202c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Thu, 29 Sep 2011 10:16:13 +0200 Subject: Transformed function macros in util.h to inline functions --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index ed11a9b..18db413 100644 --- a/main.c +++ b/main.c @@ -144,7 +144,7 @@ void set_timeout(timeout_f handler, int time, bool overwrite) { if (timeouts[i].handler == handler) { if (!timeouts[i].active || overwrite) { gettimeofday(&timeouts[i].when, 0); - MSEC_ADD_TO_TIMEVAL(time, &timeouts[i].when); + tv_add_msec(&timeouts[i].when, time); timeouts[i].active = true; } return; @@ -170,7 +170,7 @@ bool check_timeouts(struct timeval *t) { gettimeofday(&now, 0); while (i < ARRLEN(timeouts)) { if (timeouts[i].active) { - tdiff = TIMEDIFF(&timeouts[i].when, &now); + tdiff = tv_diff(&timeouts[i].when, &now); if (tdiff <= 0) { timeouts[i].active = false; if (timeouts[i].handler) @@ -183,7 +183,7 @@ bool check_timeouts(struct timeval *t) { i++; } if (tmin > 0 && t) - MSEC_TO_TIMEVAL(tmin, t); + tv_set_msec(t, tmin); return tmin > 0; } -- cgit v1.2.3