| 250 | } |
| 251 | |
| 252 | Timestamp Checkable::GetNextUpdate() const |
| 253 | { |
| 254 | auto cr (GetLastCheckResult()); |
| 255 | double interval, latency; |
| 256 | |
| 257 | // TODO: Document this behavior. |
| 258 | if (cr) { |
| 259 | interval = GetEnableActiveChecks() && GetProblem() && GetStateType() == StateTypeSoft ? GetRetryInterval() : GetCheckInterval(); |
| 260 | latency = cr->GetExecutionEnd() - cr->GetScheduleStart(); |
| 261 | } else { |
| 262 | interval = GetCheckInterval(); |
| 263 | latency = 0.0; |
| 264 | } |
| 265 | |
| 266 | return (GetEnableActiveChecks() ? GetNextCheck() : (cr ? cr->GetExecutionEnd() : Application::GetStartTime()) + interval) + interval + 2 * latency; |
| 267 | } |
| 268 | |
| 269 | void Checkable::NotifyFixedDowntimeStart(const Downtime::Ptr& downtime) |
| 270 | { |
no outgoing calls
no test coverage detected