mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Get the time jump logic right.
This commit is contained in:
@@ -295,9 +295,9 @@ void LoadManager::threadEntry()
|
|||||||
t += boost::posix_time::seconds(1);
|
t += boost::posix_time::seconds(1);
|
||||||
boost::posix_time::time_duration when = t - boost::posix_time::microsec_clock::universal_time();
|
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();
|
t = boost::posix_time::microsec_clock::universal_time();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user