My process was using 90% cpu so i have used usleep(1000).
but after using this also nothing is happening my process is using same cpu.
Please need a help for this.
The parameter to usleep() is in microseconds (hence the u: a convenient way to write the Greek letter mu). Thus, usleep(1000) yields for 1 millisecond.
I have given usleep(10000) means (100 millisecond) but also my service is taking to 70 to 80 CPU
10000 microseconds is 10 milliseconds.
Ya . i got that..
but my que is how to minimize the cpu utilization?
Write a more efficient program maybe?