-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
Author: [email protected] | ||
Last modified: 2018-4-24 | ||
Last modified: 2019-6-11 | ||
Description: https://github.com/wlgq2/libuv_cpp11 | ||
*/ | ||
|
@@ -31,6 +31,7 @@ class Timer | |
|
||
void start(); | ||
void close(TimerCloseComplete callback); | ||
void setTimerRepeat(uint64_t ms); | ||
|
||
private: | ||
bool started_; | ||
|
@@ -104,6 +105,12 @@ inline void Timer<ValueType>::close(TimerCloseComplete callback) | |
} | ||
} | ||
|
||
template<typename ValueType> | ||
inline void Timer<ValueType>::setTimerRepeat(uint64_t ms) | ||
{ | ||
::uv_timer_set_repeat(handle_, ms); | ||
} | ||
|
||
template<typename ValueType> | ||
inline void Timer<ValueType>::onTimeOut() | ||
{ | ||
|