acme: increase timer resolution to 10ms
We ran for a long time with 10ms kernel resolution, so 10ms user space resolution here should be fine. Some systems actually provide 1ms sleeps, which makes this polling use a bit more cpu than we'd like. Since the timers are for user-visible things, 10ms should still be far from noticeable. Reduces acme's cpu usage on Macs when plumber is missing (and plumbproc is sleeping waiting for it to appear). LGTM=aram, r R=r, aram https://codereview.appspot.com/99570043
This commit is contained in:
parent
113ea95f7b
commit
6400c9f20c
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ timerproc(void *v)
|
||||||
nt = 0;
|
nt = 0;
|
||||||
old = msec();
|
old = msec();
|
||||||
for(;;){
|
for(;;){
|
||||||
sleep(1); /* will sleep minimum incr */
|
sleep(10); /* longer sleeps here delay recv on ctimer, but 10ms should not be noticeable */
|
||||||
new = msec();
|
new = msec();
|
||||||
dt = new-old;
|
dt = new-old;
|
||||||
old = new;
|
old = new;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue