From 3d26cfc1854cdae96b62b536983b1239b32e9ec2 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 25 Jan 2008 19:57:42 +0000 Subject: fixed worker timeout which was accidently not set (and thus 0) --- srUtils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'srUtils.c') diff --git a/srUtils.c b/srUtils.c index efcd7e6d..3d30f5a2 100755 --- a/srUtils.c +++ b/srUtils.c @@ -321,12 +321,16 @@ timeoutComp(struct timespec *pt, long iTimeout) assert(pt != NULL); /* compute timeout */ clock_gettime(CLOCK_REALTIME, pt); +RUNLOG_VAR("%ld", pt->tv_nsec); pt->tv_nsec += (iTimeout % 1000) * 1000000; /* think INTEGER arithmetic! */ +RUNLOG_VAR("%ld", pt->tv_nsec); if(pt->tv_nsec > 999999999) { /* overrun? */ +RUNLOG; pt->tv_nsec -= 1000000000; - ++pt->tv_sec; } +RUNLOG_VAR("%ld", pt->tv_sec); pt->tv_sec += iTimeout / 1000; +RUNLOG_VAR("%ld", pt->tv_sec); return RS_RET_OK; /* so far, this is static... */ } -- cgit