Oct 4, 2012 at 7:20am Oct 4, 2012 at 7:20am UTC
Hello Everyone,
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.
Oct 4, 2012 at 8:37am Oct 4, 2012 at 8:37am UTC
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.
Oct 4, 2012 at 9:12am Oct 4, 2012 at 9:12am UTC
Hey Helios,
I have given usleep(10000) means (100 millisecond) but also my service is taking to 70 to 80 CPU
Oct 4, 2012 at 10:24am Oct 4, 2012 at 10:24am UTC
10000 microseconds is 10 milliseconds.
Oct 4, 2012 at 10:28am Oct 4, 2012 at 10:28am UTC
Dear peter,
Ya . i got that..
but my que is how to minimize the cpu utilization?
Oct 4, 2012 at 3:19pm Oct 4, 2012 at 3:19pm UTC
Write a more efficient program maybe?