Tell the CPU to wait for you?
Na, keep the CPU busy with useless crap till you need it.
Have you considered a career in middle management
This should be the new isEven()/isOdd(). Calculate the speed of the CPU and use that to determine how long it might take to achieve a ‘sleep’ of a required time.
I took an embedded hardware class where specifically we were required to manually calculate our sleeps or use interrupts and timers rather than using a library function to do it for us.
Its a thing. https://en.m.wikipedia.org/wiki/Busy_waiting
I can relate. We have breaks ate work too.
deleted by creator
I think some compilers will just drop that in the optimization step.
Ah yes. The speedup-loop.
https://thedailywtf.com/articles/The-Speedup-LoopI just measured it, and this takes 0.17 seconds. And it’s really reliable, I added another zero to that number and it was 1.7 seconds