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 13
13
#include < boost/date_time/posix_time/posix_time.hpp>
14
14
#include < boost/thread.hpp>
15
15
#include < ctime>
16
+ #include < thread>
17
+
16
18
#include < tinyformat.h>
17
19
20
+ void UninterruptibleSleep (const std::chrono::microseconds& n) { std::this_thread::sleep_for (n); }
21
+
18
22
static std::atomic<int64_t > nMockTime (0 ); // !< For unit testing
19
23
20
24
int64_t GetTime ()
@@ -124,4 +128,4 @@ int64_t ParseISO8601DateTime(const std::string& str)
124
128
if (ptime.is_not_a_date_time () || epoch > ptime)
125
129
return 0 ;
126
130
return (ptime - epoch).total_seconds ();
127
- }
131
+ }
Original file line number Diff line number Diff line change 10
10
#include < string>
11
11
#include < chrono>
12
12
13
+ void UninterruptibleSleep (const std::chrono::microseconds& n);
14
+
13
15
/* *
14
16
* Helper to count the seconds of a duration.
15
17
*
You can’t perform that action at this time.
0 commit comments