joerg added inline comments.
================ Comment at: include/__threading_support:367 + ts.tv_sec = ts_sec_max; + ts.tv_nsec = giga::num - 1; + } ---------------- I don't think giga::num makes things any clear compared to just spelling it out. ================ Comment at: include/__threading_support:593 + using namespace chrono; + milliseconds ms = duration_cast<milliseconds>(ns); + if (ms.count() == 0 || ns > duration_cast<nanoseconds>(ms)) ---------------- Use (ns + 999999) so that the cast rounds up. ================ Comment at: include/__threading_support:594 + milliseconds ms = duration_cast<milliseconds>(ns); + if (ms.count() == 0 || ns > duration_cast<nanoseconds>(ms)) + ++ms; ---------------- Why is ns == 0 supposed to sleep at all? In fact, the caller already ensures that can't happen? https://reviews.llvm.org/D29630 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits