mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 06:34:42 +02:00
Make sure the check latency can't be negative.
This commit is contained in:
parent
eb20b7e33e
commit
f418db79d7
@ -837,5 +837,10 @@ double Service::CalculateLatency(const Dictionary::Ptr& cr)
|
|||||||
schedule_end = cr->Get("schedule_end");
|
schedule_end = cr->Get("schedule_end");
|
||||||
}
|
}
|
||||||
|
|
||||||
return (schedule_end - schedule_start) - CalculateExecutionTime(cr);
|
double latency = (schedule_end - schedule_start) - CalculateExecutionTime(cr);
|
||||||
|
|
||||||
|
if (latency < 0)
|
||||||
|
latency = 0;
|
||||||
|
|
||||||
|
return latency;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user