Permalink
Browse files

Fix premature overwriting of OLDTIME that resulted in time drifts nev…

…er being detected
  • Loading branch information...
attilamolnar committed Mar 28, 2013
1 parent 63b7384 commit 4e9cfa5b3abd4a71764dd29f53c646f03b60535d
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/inspircd.cpp
View
@@ -789,7 +789,6 @@ int InspIRCd::Run()
*/
if (TIME.tv_sec != OLDTIME)
{
- OLDTIME = TIME.tv_sec;
#ifndef _WIN32
getrusage(RUSAGE_SELF, &ru);
stats->LastSampled = TIME;
@@ -816,6 +815,8 @@ int InspIRCd::Run()
{
SNO->WriteToSnoMask('d', "\002EH?!\002 -- Time is jumping FORWARDS! Clock skipped %lu secs.", (unsigned long)TIME.tv_sec - OLDTIME);
}
+
+ OLDTIME = TIME.tv_sec;
if ((TIME.tv_sec % 3600) == 0)
{

0 comments on commit 4e9cfa5

Please sign in to comment.