How do developers write applications that use next to no cpu? For example frozen bubble / kdevelop ... or any decent app.
My application waits for keyboard events in a while loop. But the cpu usage of the application jumps to 90% as a result!
This is an SDL application, but I also wrote a simple program and got the same problem..
unsigned int x = 0;
if ( x == 0 )
cout << "x looped" << endl;
The cpu usage is also in the 90 percentile here. How do developers write applications that use next to no cpu?