| 323 | } |
| 324 | |
| 325 | void 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 | |
| 349 | void TimePeriod::Dump() |
| 350 | { |
nothing calls this directly
no test coverage detected