diff options
author | 2016-09-16 13:25:08 -0700 | |
---|---|---|
committer | 2016-09-16 13:25:08 -0700 | |
commit | 9030c81f20c3721e7b0a92564f6e4d772a78ffcb (patch) | |
tree | 3bbe7fbaa32805f15d2153e7c9b814846ebc23c9 /src/core/lib/iomgr/timer.h | |
parent | 6257159a3ae19f5caa3b44bcd201fc9183963cfe (diff) |
Add a libuv endpoint to the C core, for use in the Node library
Diffstat (limited to 'src/core/lib/iomgr/timer.h')
-rw-r--r-- | src/core/lib/iomgr/timer.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/lib/iomgr/timer.h b/src/core/lib/iomgr/timer.h index a825d2a28b..b76ba079c4 100644 --- a/src/core/lib/iomgr/timer.h +++ b/src/core/lib/iomgr/timer.h @@ -34,19 +34,20 @@ #ifndef GRPC_CORE_LIB_IOMGR_TIMER_H #define GRPC_CORE_LIB_IOMGR_TIMER_H +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_UV +#include "src/core/lib/iomgr/timer_uv.h" +#else +#include "src/core/lib/iomgr/timer_generic.h" +#endif /* GRPC_UV */ + #include <grpc/support/port_platform.h> #include <grpc/support/time.h> #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr.h" -typedef struct grpc_timer { - gpr_timespec deadline; - uint32_t heap_index; /* INVALID_HEAP_INDEX if not in heap */ - int triggered; - struct grpc_timer *next; - struct grpc_timer *prev; - grpc_closure closure; -} grpc_timer; +typedef struct grpc_timer grpc_timer; /* Initialize *timer. When expired or canceled, timer_cb will be called with *timer_cb_arg and status to indicate if it expired (SUCCESS) or was |