summaryrefslogtreecommitdiff
path: root/Source/cmUVHandlePtr.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-30 11:19:04 -0500
committerBrad King <brad.king@kitware.com>2017-11-30 13:26:35 -0500
commitdd700e9bfb2a498632845e76ce95dd38bb866a7b (patch)
tree79fb14a5c887417275b704e9175a22af56517cc7 /Source/cmUVHandlePtr.h
parent32cfa7b324de799eefb2f7370fb54b700d1a87a5 (diff)
downloadcmake-dd700e9bfb2a498632845e76ce95dd38bb866a7b.tar.gz
cmUVHandlePtr: Add uv_timer_ptr
Diffstat (limited to 'Source/cmUVHandlePtr.h')
-rw-r--r--Source/cmUVHandlePtr.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmUVHandlePtr.h b/Source/cmUVHandlePtr.h
index a251c5f54a..d3df69cd2d 100644
--- a/Source/cmUVHandlePtr.h
+++ b/Source/cmUVHandlePtr.h
@@ -5,6 +5,7 @@
#include <algorithm>
#include <cstddef>
+#include <cstdint>
#include <memory>
#include <type_traits>
@@ -164,6 +165,15 @@ struct uv_pipe_ptr : public uv_handle_ptr_<uv_pipe_t>
int init(uv_loop_t& loop, int ipc, void* data = nullptr);
};
+struct uv_timer_ptr : public uv_handle_ptr_<uv_timer_t>
+{
+ CM_PERFECT_FWD_CTOR(uv_timer_ptr, uv_handle_ptr_<uv_timer_t>);
+
+ int init(uv_loop_t& loop, void* data = nullptr);
+
+ int start(uv_timer_cb cb, uint64_t timeout, uint64_t repeat);
+};
+
struct uv_tty_ptr : public uv_handle_ptr_<uv_tty_t>
{
CM_PERFECT_FWD_CTOR(uv_tty_ptr, uv_handle_ptr_<uv_tty_t>);
@@ -192,6 +202,8 @@ UV_HANDLE_PTR_INSTANTIATE_EXTERN(pipe)
UV_HANDLE_PTR_INSTANTIATE_EXTERN(stream)
+UV_HANDLE_PTR_INSTANTIATE_EXTERN(timer)
+
UV_HANDLE_PTR_INSTANTIATE_EXTERN(tty)
#undef UV_HANDLE_PTR_INSTANTIATE_EXTERN