#include int main() { while(!DONE) { /* check for stuff */ } return 0; }
The above code sample uses 100% cpu until DONE
Use yield().