by astoilkov · 2y ago · 0 comments
await yieldOrContinue('user-visible');
doSomeWork();
against if (isTimeToYield('user-visible')) {
await yieldControl('user-visible');
}
doSomeWork();
A few years back when I measured it on a fast laptop the cost was ~1µs to do `await 0;`