| 59 | } |
| 60 | |
| 61 | void MilliSleep(int64_t n) |
| 62 | { |
| 63 | |
| 64 | /** |
| 65 | * Boost's sleep_for was uninterruptible when backed by nanosleep from 1.50 |
| 66 | * until fixed in 1.52. Use the deprecated sleep method for the broken case. |
| 67 | * See: https://svn.boost.org/trac/boost/ticket/7238 |
| 68 | */ |
| 69 | #if defined(HAVE_WORKING_BOOST_SLEEP_FOR) |
| 70 | boost::this_thread::sleep_for(boost::chrono::milliseconds(n)); |
| 71 | #elif defined(HAVE_WORKING_BOOST_SLEEP) |
| 72 | boost::this_thread::sleep(boost::posix_time::milliseconds(n)); |
| 73 | #else |
| 74 | //should never get here |
| 75 | #error missing boost sleep implementation |
| 76 | #endif |
| 77 | } |
| 78 | |
| 79 | std::string FormatISO8601DateTime(int64_t nTime) { |
| 80 | struct tm ts; |
no outgoing calls