Bugfix: Don't use check interval offsets for services with a check_interval smaller than 1 second.

This commit is contained in:
Gunnar Beutner 2013-02-08 10:29:17 +01:00
parent 513b3d6820
commit 10cc9bb1a3
1 changed files with 7 additions and 2 deletions

View File

@ -284,8 +284,13 @@ void Service::UpdateNextCheck(void)
else
interval = GetCheckInterval();
double now = Utility::GetTime();
double adj = fmod(now + GetSchedulingOffset(), interval);
double adj = 0;
if (interval > 1)
double now = Utility::GetTime();
adj = fmod(now + GetSchedulingOffset(), interval);
}
SetNextCheck(now - adj + interval);
}