scm_gc_protect_object(function);
Timer *timer = new Timer (++counter, when, function);
- TimerList::iterator it = std::find_if (timers.begin (), timers.end (),
- std::bind1st (timer_sort_p, timer));
-
- if (it != timers.end ())
- timers.insert (it, timer);
- else
- timers.push_back (timer);
+ Utils::push_sorted (timers, timer, timer_sort_p);
return scm_from_int (counter);