File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1313#include < boost/date_time/posix_time/posix_time.hpp>
1414#include < boost/thread.hpp>
1515#include < ctime>
16+ #include < thread>
17+
1618#include < tinyformat.h>
1719
20+ void UninterruptibleSleep (const std::chrono::microseconds& n) { std::this_thread::sleep_for (n); }
21+
1822static std::atomic<int64_t > nMockTime (0 ); // !< For unit testing
1923
2024int64_t GetTime ()
@@ -124,4 +128,4 @@ int64_t ParseISO8601DateTime(const std::string& str)
124128 if (ptime.is_not_a_date_time () || epoch > ptime)
125129 return 0 ;
126130 return (ptime - epoch).total_seconds ();
127- }
131+ }
Original file line number Diff line number Diff line change 1010#include < string>
1111#include < chrono>
1212
13+ void UninterruptibleSleep (const std::chrono::microseconds& n);
14+
1315/* *
1416 * Helper to count the seconds of a duration.
1517 *
You can’t perform that action at this time.
0 commit comments