Value ServicesTable::HasBeenCheckedAccessor(const Value& row) { Service::Ptr service = static_cast<Service::Ptr>(row); if (!service) return Empty; return Convert::ToLong(service->HasBeenChecked()); }
Value ServicesTable::StalenessAccessor(const Value& row) { Service::Ptr service = static_cast<Service::Ptr>(row); if (!service) return Empty; if (service->HasBeenChecked() && service->GetLastCheck() > 0) return (Utility::GetTime() - service->GetLastCheck()) / (service->GetCheckInterval() * 3600); return 0.0; }