#include <iomanip>
#include <sstream>
-using namespace std;
-
/** Base class without constructors for uint256 and uint160.
* This makes the compiler let u use it in a union.
virtual const char* what() const throw () { return what_.c_str(); }
virtual ~uint256_error() throw () {}
private:
- std::string what_;
+ std::string what_;
};
/** 256-bit unsigned integer */
#define MAX_PATH 1024
inline void Sleep(int64_t n)
{
- this_thread::sleep_for(std::chrono::milliseconds(n));
+ /*Boost has a year 2038 problem— if the request sleep time is past epoch+2^31 seconds the sleep returns instantly.
+ So we clamp our sleeps here to 10 years and hope that boost is fixed by 2028.*/
+ boost::thread::sleep(boost::get_system_time() + boost::posix_time::milliseconds(n>315576000000LL?315576000000LL:n));
}
#endif