summaryrefslogtreecommitdiffstats
path: root/srUtils.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-25 19:25:46 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-25 19:25:46 +0000
commit87f0e9b5f91407418a43a06f39831febfbd4e3ad (patch)
tree810a4191b8cfd14a4a2a19399dbe894b16b5e6ae /srUtils.c
parent167abdb5b3fa6900edd6bbdb1cc7d586896a268c (diff)
downloadrsyslog-87f0e9b5f91407418a43a06f39831febfbd4e3ad.tar.gz
rsyslog-87f0e9b5f91407418a43a06f39831febfbd4e3ad.tar.xz
rsyslog-87f0e9b5f91407418a43a06f39831febfbd4e3ad.zip
disk-assisted queue mode finally begins to look good ;)
Diffstat (limited to 'srUtils.c')
-rwxr-xr-xsrUtils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/srUtils.c b/srUtils.c
index 4c64ce89..efcd7e6d 100755
--- a/srUtils.c
+++ b/srUtils.c
@@ -354,9 +354,9 @@ timeoutVal(struct timespec *pt)
iTimeout = (pt->tv_nsec - t.tv_nsec) / 1000;
}
} else {
- iTimeout = pt->tv_sec - t.tv_nsec;
- iTimeout += 1000 - (pt->tv_nsec / 1000);
- iTimeout += t.tv_nsec / 1000;
+ iTimeout = (pt->tv_sec - t.tv_sec) * 1000;
+ iTimeout += 1000 - (pt->tv_nsec / 1000000);
+ iTimeout += t.tv_nsec / 1000000;
}
return iTimeout;