I'm trying to write a program which will always loop.
Besides that, i also use a function called wait() within the loop.
The wait() function is to make sure the loop runs once each second.
But one problem arise:
The program used up all my CPU usage until 98% all the time!
My program is look like this:
while(condition == true)
{
//codes
wait();
}
It's there any programming method which will save more CPU usage while using a loop?