14 namespace duds {
namespace general {
27 template <
class Duration>
29 auto when = std::chrono::high_resolution_clock::now() + duration;
31 std::this_thread::yield();
32 }
while (std::chrono::high_resolution_clock::now() < when);
void YieldingWait(Duration duration)
Waits for a minumum period of time by calling std::this_thread::yield() in a loop.