diff options
| author | Cory Fields <[email protected]> | 2015-04-09 20:11:14 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2015-05-14 10:37:19 -0400 |
| commit | cfefe5b88c57c08759492647b360c17126acb826 (patch) | |
| tree | 1c44f027e795cbbcba129183bc62ff9c12232c63 /src/scheduler.cpp | |
| parent | build: make libboost_chrono mandatory (diff) | |
| download | discoin-cfefe5b88c57c08759492647b360c17126acb826.tar.xz discoin-cfefe5b88c57c08759492647b360c17126acb826.zip | |
scheduler: fix with boost <= 1.50
Diffstat (limited to 'src/scheduler.cpp')
| -rw-r--r-- | src/scheduler.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/scheduler.cpp b/src/scheduler.cpp index ff223c231..8b55888ae 100644 --- a/src/scheduler.cpp +++ b/src/scheduler.cpp @@ -21,11 +21,7 @@ CScheduler::~CScheduler() #if BOOST_VERSION < 105000 static boost::system_time toPosixTime(const boost::chrono::system_clock::time_point& t) { - boost::chrono::system_clock::duration d = t.time_since_epoch(); - 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; + return boost::posix_time::from_time_t(boost::chrono::system_clock::to_time_t(t)); } #endif |