summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3d90f75)
raw | patch | inline | side by side (parent: 3d90f75)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 14 Oct 2008 06:37:19 +0000 (06:37 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 14 Oct 2008 06:37:19 +0000 (06:37 +0000) |
program/src/rrd_daemon.c | patch | blob | history |
index 28912c5358f8d17214b34d7c681fe8bcf714b69b..5c47ac1fd7b3908edce814a15631c1768e571442 100644 (file)
--- a/program/src/rrd_daemon.c
+++ b/program/src/rrd_daemon.c
flush_old_values (config_write_interval);
/* Determine the time of the next cache flush. */
- while (next_flush.tv_sec <= now.tv_sec)
- next_flush.tv_sec += config_flush_interval;
+ next_flush.tv_sec =
+ now.tv_sec + next_flush.tv_sec % config_flush_interval;
/* unlock the cache while we rotate so we don't block incoming
* updates if the fsync() blocks on disk I/O */