summaryrefslogtreecommitdiff
path: root/src/timer.c
diff options
context:
space:
mode:
authorbustico2008-02-06 16:32:54 +0000
committerbustico2008-02-06 16:32:54 +0000
commitee2e694ebba179f1c75764a7311df717fa3925cd (patch)
treea9da6c6d525241725597c7d641c90436239c91d9 /src/timer.c
parentc50b5d38c1fc5491e8c99c8a86b043d39e074acc (diff)
downloadivy-c-ee2e694ebba179f1c75764a7311df717fa3925cd.zip
ivy-c-ee2e694ebba179f1c75764a7311df717fa3925cd.tar.gz
ivy-c-ee2e694ebba179f1c75764a7311df717fa3925cd.tar.bz2
ivy-c-ee2e694ebba179f1c75764a7311df717fa3925cd.tar.xz
* 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.
Diffstat (limited to 'src/timer.c')
-rw-r--r--src/timer.c2
1 files changed, 1 insertions, 1 deletions
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;