ext/iodine/fio.c
/** schedules all timers that are due to be performed. */
schedules all timers that are due to be performed.
schedules all timers that are due to be performed .
static void fio_timer_schedule(void) {
  struct timespec now = fio_last_tick();
  fio_lock(&fio_timer_lock);
  while (fio_ls_embd_any(&fio_timers) &&
         fio_timer_compare(
             FIO_LS_EMBD_OBJ(fio_timer_s, node, fio_timers.next)->due, now) >=
             0) {
    fio_ls_embd_s *tmp = fio_ls_embd_remove(fio_timers.next);
    fio_defer(fio_timer_perform_single, FIO_LS_EMBD_OBJ(fio_timer_s, node, tmp),
              NULL);
  }
  fio_unlock(&fio_timer_lock);
}
static void fio_timer_schedule ( void ) { struct timespec now = fio_last_tick ( ) ; fio_lock ( & fio_timer_lock ) ; while ( fio_ls_embd_any ( & fio_timers ) && fio_timer_compare ( FIO_LS_EMBD_OBJ ( fio_timer_s , node , fio_timers . next ) -> due , now ) >= 0 ) { fio_ls_embd_s * tmp = fio_ls_embd_remove ( fio_timers . next ) ; fio_defer ( fio_timer_perform_single , FIO_LS_EMBD_OBJ ( fio_timer_s , node , tmp ) , NULL ) ; } fio_unlock ( & fio_timer_lock ) ; }
schedules all timers that are due to be performed.
schedules all timers that are due to be performed .