summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4d7643e)
raw | patch | inline | side by side (parent: 4d7643e)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 19 Aug 2010 12:34:21 +0000 (14:34 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 19 Aug 2010 12:34:21 +0000 (14:34 +0200) |
src/collectd-tg.c | patch | blob | history |
diff --git a/src/collectd-tg.c b/src/collectd-tg.c
index c5d7eb0db69d5fea0842cdb3aa7a5232f784f9ba..4df14ffb6e3be225fbab558343270416d676ace3 100644 (file)
--- a/src/collectd-tg.c
+++ b/src/collectd-tg.c
host_num = get_boundet_random (0, conf_num_hosts);
- vl->interval = 10;
- vl->time = time (NULL) - (host_num % vl->interval);
+ vl->interval = conf_interval;
+ vl->time = time (NULL) + (host_num % vl->interval) + 1;
if (get_boundet_random (0, 2) == 0)
vl->values_types[0] = LCC_TYPE_GAUGE;
struct timespec ts = { 0, 10000000 };
nanosleep (&ts, /* remaining = */ NULL);
now = time (NULL);
+
+ if (!loop)
+ break;
}
last_time = vl->time;
}