Change sleep_for, sleep_until, and the condition_variable timed wait
functions to protect against duration and time_point overflow.  Since
we're about to wait anyway, we can afford to spend a few more cycles on
this checking.  I purposefully did not treat the timed try_locks with
overflow checking.  This fixes
http://llvm.org/bugs/show_bug.cgi?id=13721 .  I'm unsure if the standard
needs clarification in this area, or if this is simply QOI.  The
<chrono> facilities were never intended to overflow check, but just to
not overflow if durations stayed within +/- 292 years.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162925 91177308-0d34-0410-b5e6-96231b3b80d8
4 files changed