usleep(1000) is not working
Gajananh999 (12)
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.
helios (10126)
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.
Gajananh999 (12)
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
Peter87 (3688)
Oct 4, 2012 at 10:24am UTC
10000 microseconds is 10 milliseconds.
Gajananh999 (12)
Oct 4, 2012 at 10:28am UTC
Dear peter,
Ya . i got that..
but my que is how to minimize the cpu utilization?
kbw (5374)
Oct 4, 2012 at 1:20pm UTC
but my que is how to minimize the cpu utilization?
That's impossible to answer without some kind of context.
Topic archived. No new replies allowed.