summaryrefslogtreecommitdiffstats
path: root/Source/cmUVHandlePtr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmUVHandlePtr.cxx')
-rw-r--r--Source/cmUVHandlePtr.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmUVHandlePtr.cxx b/Source/cmUVHandlePtr.cxx
index 8ba93e5..78819a5 100644
--- a/Source/cmUVHandlePtr.cxx
+++ b/Source/cmUVHandlePtr.cxx
@@ -172,6 +172,18 @@ uv_pipe_ptr::operator uv_stream_t*() const
}
#ifdef CMAKE_BUILD_WITH_CMAKE
+int uv_timer_ptr::init(uv_loop_t& loop, void* data)
+{
+ allocate(data);
+ return uv_timer_init(&loop, *this);
+}
+
+int uv_timer_ptr::start(uv_timer_cb cb, uint64_t timeout, uint64_t repeat)
+{
+ assert(handle);
+ return uv_timer_start(*this, cb, timeout, repeat);
+}
+
uv_tty_ptr::operator uv_stream_t*() const
{
return reinterpret_cast<uv_stream_t*>(handle.get());
@@ -199,6 +211,8 @@ UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(stream)
#ifdef CMAKE_BUILD_WITH_CMAKE
UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(async)
+UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(timer)
+
UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(tty)
#endif
}