mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[timer] set_event_for_timer is only for libevent
This commit is contained in:
parent
d56ad7ceb0
commit
e532e348f8
@ -122,11 +122,10 @@ check_timers(timeval_T *last_time)
|
|||||||
timeval_copy(last_time, &now);
|
timeval_copy(last_time, &now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_LIBEVENT
|
||||||
static void
|
static void
|
||||||
set_event_for_timer(timer_id_T tm)
|
set_event_for_timer(timer_id_T tm)
|
||||||
{
|
{
|
||||||
#ifdef USE_LIBEVENT
|
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
struct event *ev = timer_event(tm);
|
struct event *ev = timer_event(tm);
|
||||||
timeout_set(ev, timer_callback, tm);
|
timeout_set(ev, timer_callback, tm);
|
||||||
@ -144,8 +143,8 @@ set_event_for_timer(timer_id_T tm)
|
|||||||
#endif
|
#endif
|
||||||
if (timeout_add(ev, &tv) == -1)
|
if (timeout_add(ev, &tv) == -1)
|
||||||
elinks_internal("ERROR: timeout_add failed: %s", strerror(errno));
|
elinks_internal("ERROR: timeout_add failed: %s", strerror(errno));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Install a timer that calls @func(@data) after @delay milliseconds.
|
/* Install a timer that calls @func(@data) after @delay milliseconds.
|
||||||
* Store to *@id either the ID of the new timer, or TIMER_ID_UNDEF if
|
* Store to *@id either the ID of the new timer, or TIMER_ID_UNDEF if
|
||||||
|
Loading…
Reference in New Issue
Block a user