diff --git a/SConstruct b/SConstruct index a5fc99841a..c753ed5b9a 100644 --- a/SConstruct +++ b/SConstruct @@ -297,7 +297,6 @@ def config_env(toolchain, variant, env): 'boost_program_options', 'boost_regex', 'boost_system', - 'boost_thread' ] # We prefer static libraries for boost if env.get('BOOST_ROOT'): diff --git a/src/ripple/app/main/LoadManager.cpp b/src/ripple/app/main/LoadManager.cpp index 4c662c66b3..618931bedb 100644 --- a/src/ripple/app/main/LoadManager.cpp +++ b/src/ripple/app/main/LoadManager.cpp @@ -18,8 +18,6 @@ //============================================================================== #include -// REMOVE ASAP -#include namespace ripple { @@ -157,10 +155,10 @@ public: // void run () { - // VFALCO TODO replace this with a beast Time object? - // + using clock_type = std::chrono::steady_clock; + // Initialize the clock to the current time. - boost::posix_time::ptime t = boost::posix_time::microsec_clock::universal_time (); + auto t = clock_type::now(); while (! threadShouldExit ()) { @@ -222,17 +220,17 @@ public: getApp().getOPs ().reportFeeChange (); } - t += boost::posix_time::seconds (1); - boost::posix_time::time_duration when = t - boost::posix_time::microsec_clock::universal_time (); + t += std::chrono::seconds (1); + auto const duration = t - clock_type::now(); - if ((when.is_negative ()) || (when.total_seconds () > 1)) + if ((duration < std::chrono::seconds (0)) || (duration > std::chrono::seconds (1))) { m_journal.warning << "time jump"; - t = boost::posix_time::microsec_clock::universal_time (); + t = clock_type::now(); } else { - boost::this_thread::sleep (when); + std::this_thread::sleep_for (duration); } }