From fadceb072dca1581435e8fcc3f616be8e5609e85 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 5 Feb 2013 21:55:18 -0800 Subject: [PATCH] Get the time jump logic right. --- src/cpp/ripple/LoadManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/ripple/LoadManager.cpp b/src/cpp/ripple/LoadManager.cpp index f8454c663..485202b8f 100644 --- a/src/cpp/ripple/LoadManager.cpp +++ b/src/cpp/ripple/LoadManager.cpp @@ -295,9 +295,9 @@ void LoadManager::threadEntry() t += boost::posix_time::seconds(1); boost::posix_time::time_duration when = t - boost::posix_time::microsec_clock::universal_time(); - if (when.is_negative()) + if ((when.is_negative()) || (when.total_seconds() > 1)) { - cLog(lsWARNING) << "Backwards time jump"; + cLog(lsWARNING) << "time jump"; t = boost::posix_time::microsec_clock::universal_time(); } else