improved timer resolution -> this helps iMuse *a lot* on my system when there is load

svn-id: r10804
This commit is contained in:
Max Horn 2003-10-14 20:52:27 +00:00
parent 2968be7670
commit a8e1340c45

View File

@ -91,7 +91,7 @@ int Timer::handler(int t) {
for (l = 0; l < MAX_TIMERS; l++) {
if ((_timerSlots[l].procedure) && (_timerSlots[l].interval > 0)) {
_timerSlots[l].counter -= interval;
if (_timerSlots[l].counter <= 0) {
while (_timerSlots[l].counter <= 0) {
_timerSlots[l].counter += _timerSlots[l].interval;
_timerSlots[l].procedure(_timerSlots[l].refCon);
}