5 ms·
By any chance do you have any references or information on how to do this (adding a spin delay)? It sounds interesting. -thanks :)
by proverbialbunny 7y ago
By any chance do you have any references or information on how to do this (adding a spin delay)? It sounds interesting. -thanks :)
- Gibbon1 7y agoIn C it's very simple volatile int cnt = 0x1000; while(cnt--) ;
- hoseja 7y agoI've grown so paranoid of optimizing compilers this wouldn't even cross my mind. But it is correct, right?
- AlbertoGP 7y agoNot OP, but the “volatile” qualifier should prevent the compiler from optimizing it out.
- Gibbon1 7y agoYeah should. Multicore super scalar processors make me nervous about my assumptions. I wouldn't put it past one of them to realize that the result is unused and nop it. It's always good to check.