[icinga-checkins] icinga.org: icinga2/master: Improve check latency.

git at icinga.org git at icinga.org
Thu Mar 7 09:48:18 CET 2013


Module: icinga2
Branch: master
Commit: 68bd65119598791e0fede2adb2b8b9e3d06cac88
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=68bd65119598791e0fede2adb2b8b9e3d06cac88

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Thu Mar  7 09:48:00 2013 +0100

Improve check latency.

---

 lib/icinga/service-check.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/icinga/service-check.cpp b/lib/icinga/service-check.cpp
index 3edc315..368d276 100644
--- a/lib/icinga/service-check.cpp
+++ b/lib/icinga/service-check.cpp
@@ -128,7 +128,7 @@ void Service::UpdateNextCheck(void)
 	double adj = 0;
 
 	if (interval > 1)
-		adj = fmod(now + GetSchedulingOffset(), interval);
+		adj = fmod(now * 1000 + GetSchedulingOffset(), interval * 1000) / 1000.0;
 
 	SetNextCheck(now - adj + interval);
 }





More information about the icinga-checkins mailing list