From b969809d20b883ce4b13ce5397214b6d45531e55 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 16 May 2011 16:26:54 -0700 Subject: [PATCH] unix: stub out timer methods --- uv-unix.c | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/uv-unix.c b/uv-unix.c index d29ff08b..f7ed1ec3 100644 --- a/uv-unix.c +++ b/uv-unix.c @@ -867,23 +867,6 @@ void uv_unref() { } -void uv__timeout(EV_P_ ev_timer* watcher, int revents) { - uv_req_t* req = watcher->data; - assert(watcher == &req->timer); - assert(EV_TIMER & revents); - - /* This watcher is not repeating. */ - assert(!ev_is_active(watcher)); - assert(!ev_is_pending(watcher)); - - if (req->cb) { - uv_timer_cb cb = req->cb; - /* TODO skew */ - cb(req, 0, 0); - } -} - - void uv_update_time() { ev_now_update(EV_DEFAULT_UC); } @@ -894,14 +877,6 @@ int64_t uv_now() { } -int uv_timeout(uv_req_t* req, int64_t timeout) { - ev_timer_init(&req->timer, uv__timeout, timeout / 1000.0, 0.0); - ev_timer_start(EV_DEFAULT_UC_ &req->timer); - req->timer.data = req; - return 0; -} - - int uv_read_start(uv_handle_t* handle, uv_read_cb cb) { /* The UV_READING flag is irrelevant of the state of the handle - it just * expresses the desired state of the user. @@ -1085,3 +1060,24 @@ int uv_async_init(uv_handle_t* handle, uv_async_cb async_cb, int uv_async_send(uv_handle_t* handle) { ev_async_send(EV_DEFAULT_UC_ &handle->async_watcher); } + + +int uv_timer_init(uv_handle_t* handle, uv_close_cb close_cb, void* data) { + assert(0 && "implement me"); +} + + +int uv_timer_start(uv_handle_t* handle, uv_loop_cb cb, int64_t timeout, + int64_t repeat) { + assert(0 && "implement me"); +} + + +int uv_timer_stop(uv_handle_t* handle) { + assert(0 && "implement me"); +} + + +int uv_timer_again(uv_handle_t* handle) { + assert(0 && "implement me"); +}