mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
scheduler: fix with boost <= 1.50
This commit is contained in:
parent
ca66717d89
commit
cfefe5b88c
@ -21,11 +21,7 @@ CScheduler::~CScheduler()
|
|||||||
#if BOOST_VERSION < 105000
|
#if BOOST_VERSION < 105000
|
||||||
static boost::system_time toPosixTime(const boost::chrono::system_clock::time_point& t)
|
static boost::system_time toPosixTime(const boost::chrono::system_clock::time_point& t)
|
||||||
{
|
{
|
||||||
boost::chrono::system_clock::duration d = t.time_since_epoch();
|
return boost::posix_time::from_time_t(boost::chrono::system_clock::to_time_t(t));
|
||||||
boost::chrono::microseconds usecs = boost::chrono::duration_cast<boost::chrono::microseconds>(d);
|
|
||||||
boost::system_time result = boost::posix_time::from_time_t(0) +
|
|
||||||
boost::posix_time::microseconds(usecs.count());
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user