MCPcopy Create free account
hub / github.com/Icinga/icinga2 / UpdateTimerHandler

Method UpdateTimerHandler

lib/icinga/timeperiod.cpp:325–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325void TimePeriod::UpdateTimerHandler()
326{
327 double now = Utility::GetTime();
328
329 for (const TimePeriod::Ptr& tp : ConfigType::GetObjectsByType<TimePeriod>()) {
330 if (!tp->IsActive())
331 continue;
332
333 double valid_end;
334
335 {
336 ObjectLock olock(tp);
337 tp->PurgeSegments(now - 3600);
338
339 valid_end = tp->GetValidEnd();
340 }
341
342 tp->UpdateRegion(valid_end, now + 24 * 3600, false);
343#ifdef _DEBUG
344 tp->Dump();
345#endif /* _DEBUG */
346 }
347}
348
349void TimePeriod::Dump()
350{

Callers

nothing calls this directly

Calls 4

IsActiveMethod · 0.80
PurgeSegmentsMethod · 0.80
UpdateRegionMethod · 0.80
DumpMethod · 0.80

Tested by

no test coverage detected