diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2012-03-11 22:20:31 -0400 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-03-11 22:20:31 -0400 |
commit | b4f8c8f5f9ff0f8db6612d7f279976453b18876f (patch) | |
tree | 0335a682102647221898ef22d70edf6fb4532418 /src/util.h | |
parent | b3b4b008e39ed77e5c579fa0ca179fe785ee5e79 (diff) | |
parent | 11c34e0f6cf9cb2715c28b85a1ec8f47bf5ca8dd (diff) | |
download | bitcoin-b4f8c8f5f9ff0f8db6612d7f279976453b18876f.tar.xz |
Merge branch '0.4.x' into 0.5.0.x
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h index 19a291209a..34ccecac75 100644 --- a/src/util.h +++ b/src/util.h @@ -115,7 +115,9 @@ typedef u_int SOCKET; #define Beep(n1,n2) (0) inline void Sleep(int64 n) { - boost::thread::sleep(boost::get_system_time() + boost::posix_time::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 |