diff options
author | Brad King <brad.king@kitware.com> | 2020-09-23 16:13:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-09-23 16:13:59 (GMT) |
commit | e21325c2c6ab5a73682fa5ab3ec43104e397f666 (patch) | |
tree | ec73d37fe975cd56b87fb06399a3eb8c52a18be7 /Utilities/cmlibuv/src/timer.c | |
parent | d827fdb6f99e58e4dfc6fdda3816ed2862e00a95 (diff) | |
parent | c1463f959f7445207d932ec7640d77aebc2a6498 (diff) | |
download | CMake-e21325c2c6ab5a73682fa5ab3ec43104e397f666.zip CMake-e21325c2c6ab5a73682fa5ab3ec43104e397f666.tar.gz CMake-e21325c2c6ab5a73682fa5ab3ec43104e397f666.tar.bz2 |
Merge branch 'upstream-libuv' into update-libuv
* upstream-libuv:
libuv 2020-09-22 (ed5b42d5)
Diffstat (limited to 'Utilities/cmlibuv/src/timer.c')
-rw-r--r-- | Utilities/cmlibuv/src/timer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Utilities/cmlibuv/src/timer.c b/Utilities/cmlibuv/src/timer.c index 4cf4ed4..1bea2a8 100644 --- a/Utilities/cmlibuv/src/timer.c +++ b/Utilities/cmlibuv/src/timer.c @@ -130,6 +130,14 @@ uint64_t uv_timer_get_repeat(const uv_timer_t* handle) { } +uint64_t uv_timer_get_due_in(const uv_timer_t* handle) { + if (handle->loop->time >= handle->timeout) + return 0; + + return handle->timeout - handle->loop->time; +} + + int uv__next_timeout(const uv_loop_t* loop) { const struct heap_node* heap_node; const uv_timer_t* handle; |