sleep_for tries to convert arbitrary durations toward nanosecond resolution in a way that avoids truncation. The nanosecond timer is declared using long long, but the minimum required size of 64bit signed is enough for all computation needs. Avoid doing a long double constexpr computation here as older GCC versions on PowerPC have problems folding the double-double type and also avoid the additional header include at the same time. The constant equals about 290 years and should be good enough.
Details
Details
Diff Detail
Diff Detail