Add small randomness to spacing between samples for one server

This commit is contained in:
Miroslav Lichvar
2010-12-09 16:06:42 +01:00
parent d1b820e7e3
commit 833022b745
4 changed files with 26 additions and 6 deletions

View File

@@ -121,7 +121,7 @@ timeout_handler(void *arbitrary)
/* Requeue timeout. Don't care if interval drifts gradually, so just do it
* at the end. */
SCH_AddTimeoutInClass((double) d->interval, 1.0,
SCH_AddTimeoutInClass((double) d->interval, 1.0, 0.02,
SCH_NtpBroadcastClass,
timeout_handler, (void *) d);
@@ -148,7 +148,7 @@ BRD_AddDestination(IPAddr *addr, unsigned short port, int interval)
destinations[n_destinations].addr.port = port;
destinations[n_destinations].interval = interval;
SCH_AddTimeoutInClass((double) interval, 1.0,
SCH_AddTimeoutInClass((double) interval, 1.0, 0.0,
SCH_NtpBroadcastClass,
timeout_handler, (void *)(destinations + n_destinations));