sgi: get rid of timerset(0) case
This commit is contained in:
parent
6cb359cc00
commit
885d41dd7b
1 changed files with 4 additions and 8 deletions
|
@ -148,14 +148,10 @@ timerset(Tval next)
|
||||||
{
|
{
|
||||||
long period;
|
long period;
|
||||||
|
|
||||||
if(next == 0)
|
period = next - fastticks(nil);
|
||||||
|
if(period < m->minperiod)
|
||||||
|
period = m->minperiod;
|
||||||
|
else if(period > m->maxperiod - m->minperiod)
|
||||||
period = m->maxperiod;
|
period = m->maxperiod;
|
||||||
else {
|
|
||||||
period = next - fastticks(nil);
|
|
||||||
if(period > m->maxperiod)
|
|
||||||
period = m->maxperiod;
|
|
||||||
else if(period < m->minperiod)
|
|
||||||
period = m->minperiod;
|
|
||||||
}
|
|
||||||
wrcompare(rdcount()+period);
|
wrcompare(rdcount()+period);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue