Fix latency calculation.

Refs #5050
This commit is contained in:
Gunnar Beutner 2013-11-15 14:26:38 +01:00
parent 1ee21816e4
commit 8c24638ff1
1 changed files with 6 additions and 5 deletions

View File

@ -459,6 +459,7 @@ void Service::ExecuteCheck(void)
}
/* keep track of scheduling info in case the check type doesn't provide its own information */
double scheduled_start = GetNextCheck();
double before_check = Utility::GetTime();
Service::Ptr self = GetSelf();
@ -490,16 +491,16 @@ void Service::ExecuteCheck(void)
double after_check = Utility::GetTime();
if (result) {
if (!result->GetScheduleStart() == 0)
result->SetScheduleStart(before_check);
if (result->GetScheduleStart() == 0)
result->SetScheduleStart(scheduled_start);
if (!result->GetScheduleEnd() == 0)
if (result->GetScheduleEnd() == 0)
result->SetScheduleEnd(after_check);
if (!result->GetExecutionStart() == 0)
if (result->GetExecutionStart() == 0)
result->SetExecutionStart(before_check);
if (!result->GetExecutionEnd() == 0)
if (result->GetExecutionEnd() == 0)
result->SetExecutionEnd(after_check);
}