]> granicus.if.org Git - icinga2/commitdiff
Fixed calculation of next check timestamp.
authorGunnar Beutner <gunnar.beutner@netways.de>
Tue, 24 Jul 2012 14:46:48 +0000 (16:46 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Tue, 24 Jul 2012 14:46:48 +0000 (16:46 +0200)
cib/service.cpp

index ff9ccd8d00e4d35a7847532dcfeb9ab6b27a22f4..2cd8d4a2dc3af45b228c92a59c32e40a2a16cab7 100644 (file)
@@ -202,7 +202,7 @@ void Service::UpdateNextCheck(void)
        else
                interval = GetCheckInterval();
 
-       next = now + ((now - previous) / interval + 1) * interval;
+       next = (now - previous % interval) + interval;
        SetNextCheck(next);
 }