我們需要的是一個間隔計時器;它需要libevent中的ev_persist標誌。 struct timeval time; time.tv_sec = 1; time.tv_usec = 0; event_set(&my_event, 0, EV_PERSIST, ...
確定! 回上一頁