Changeset eacf8d5134454850a8d9391db1790ce0df6d6f05
- Timestamp:
- 03/14/08 05:27:50
(5 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1205472470 +0000
- git-parent:
[125a593dd802ff9e00102dcfa8de54c1422c307e]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1205472470 +0000
- Message:
make the stutter work
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r0dee069 |
reacf8d5 |
|
| 53 | 53 | </listener> |
|---|
| 54 | 54 | </listeners> |
|---|
| 55 | | <checks max_initial_stutter="5"> |
|---|
| | 55 | <checks max_initial_stutter="30000"> |
|---|
| 56 | 56 | <check uuid="1b4e28ba-2fa1-11d2-883f-b9b761bde3fb" module="ping_icmp" target="10.80.116.4" period="15000" timeout="14000"/> |
|---|
| 57 | 57 | <dc1 timeout="30000" period="60000"> |
|---|
| r4dccf83 |
reacf8d5 |
|
| 75 | 75 | struct timeval now, period; |
|---|
| 76 | 76 | double r; |
|---|
| 77 | | int offset; |
|---|
| | 77 | int offset, max; |
|---|
| 78 | 78 | |
|---|
| 79 | 79 | r = drand48(); |
|---|
| 80 | | offset = r * (MIN(MAX_INITIAL_STUTTER, check->period)); |
|---|
| | 80 | max = noit_check_max_initial_stutter(); |
|---|
| | 81 | offset = r * (MIN(max, check->period)); |
|---|
| 81 | 82 | period.tv_sec = (check->period - offset) / 1000; |
|---|
| 82 | 83 | period.tv_usec = ((check->period - offset) % 1000) * 1000; |
|---|