- scalar next_event = SCALAR(0.0);
- {
- MOOF_MUTEX_LOCK(timers_mutex_);
-
- for (timers_it_ = timers_.begin();
- timers_it_ != timers_.end();
- ++timers_it_)
- {
- scalar absolute = (*timers_it_)->fire_if_expired();
- if (next_event == SCALAR(0.0) ||
- (absolute != SCALAR(0.0) && absolute < next_event))
- {
- next_event = absolute;
- }
- }
- }
- timer::sleep(next_event, timer::absolute);
+ if (run_once() == 0);//timer::sleep(SCALAR(0.0));
+ // TODO: maybe sleep(0.0001) will actually return sooner than
+ // sleep(0)... if the kernel interprets sleep(0) as we don't need
+ // to process for an arbitrarily long timespan while specifying a
+ // value lets the kernel know when we need control back...