Skip to content

Commit cfefe5b

Browse files
theunigavinandresen
authored andcommitted
scheduler: fix with boost <= 1.50
1 parent ca66717 commit cfefe5b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/scheduler.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ CScheduler::~CScheduler()
2121
#if BOOST_VERSION < 105000
2222
static boost::system_time toPosixTime(const boost::chrono::system_clock::time_point& t)
2323
{
24-
boost::chrono::system_clock::duration d = t.time_since_epoch();
25-
boost::chrono::microseconds usecs = boost::chrono::duration_cast<boost::chrono::microseconds>(d);
26-
boost::system_time result = boost::posix_time::from_time_t(0) +
27-
boost::posix_time::microseconds(usecs.count());
28-
return result;
24+
return boost::posix_time::from_time_t(boost::chrono::system_clock::to_time_t(t));
2925
}
3026
#endif
3127

0 commit comments

Comments
 (0)