From ee2e694ebba179f1c75764a7311df717fa3925cd Mon Sep 17 00:00:00 2001 From: bustico Date: Wed, 6 Feb 2008 16:32:54 +0000 Subject: * fix realloc buffer size when big message * complete change of internal structures for performance optimisation * experimental parralelized version for performance optimisation (use and need openmp) which scale well for regexp matching on multicore/multi processor gear. --- src/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/timer.c') diff --git a/src/timer.c b/src/timer.c index 4e38c52..9718b22 100644 --- a/src/timer.c +++ b/src/timer.c @@ -63,7 +63,7 @@ static long currentTime() static void SetNewTimeout( unsigned long current, unsigned long when ) { unsigned long time; - time = when - current; + time = (when <= current) ? 0 : when - current; nextTimeout = when; selectTimeout.tv_sec = time / MILLISEC; selectTimeout.tv_usec = (time - selectTimeout.tv_sec* MILLISEC) * MILLISEC; -- cgit v1.1