c_cpp uv__run_timers.c

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c_cpp uv__run_timers.c相关的知识,希望对你有一定的参考价值。

void uv__run_timers(uv_loop_t* loop) {
  struct heap_node* heap_node;
  uv_timer_t* handle;

  for (;;) {
    heap_node = heap_min((struct heap*) &loop->timer_heap);
    if (heap_node == NULL)
      break;

    handle = container_of(heap_node, uv_timer_t, heap_node);
    if (handle->timeout > loop->time)
      break;

    uv_timer_stop(handle);
    uv_timer_again(handle);
    handle->timer_cb(handle);
  }
}

以上是关于c_cpp uv__run_timers.c的主要内容,如果未能解决你的问题,请参考以下文章

c_cpp uv__handle_unref.c

c_cpp uv__handle_ref.c

c_cpp uv__handle_stop.c

c_cpp uv__handle_start.c

c_cpp uv__handle_start.c

c_cpp uv__run_pending.c