mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
util: Remove unused MilliSleep
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
|
||||
#include <atomic>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
#include <ctime>
|
||||
#include <thread>
|
||||
|
||||
@@ -76,24 +75,6 @@ int64_t GetSystemTimeInSeconds()
|
||||
return GetTimeMicros()/1000000;
|
||||
}
|
||||
|
||||
void MilliSleep(int64_t n)
|
||||
{
|
||||
|
||||
/**
|
||||
* Boost's sleep_for was uninterruptible when backed by nanosleep from 1.50
|
||||
* until fixed in 1.52. Use the deprecated sleep method for the broken case.
|
||||
* See: https://svn.boost.org/trac/boost/ticket/7238
|
||||
*/
|
||||
#if defined(HAVE_WORKING_BOOST_SLEEP_FOR)
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(n));
|
||||
#elif defined(HAVE_WORKING_BOOST_SLEEP)
|
||||
boost::this_thread::sleep(boost::posix_time::milliseconds(n));
|
||||
#else
|
||||
//should never get here
|
||||
#error missing boost sleep implementation
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string FormatISO8601DateTime(int64_t nTime) {
|
||||
struct tm ts;
|
||||
time_t time_val = nTime;
|
||||
|
||||
Reference in New Issue
Block a user