Adhere to the naming conventions in uv_timer_* functions.
In the src/*/timer.c code the first argument is called handle, not timer. We should be consistent in the interface definition file.
This commit is contained in:
parent
b6f72e54c4
commit
7480974efe
12
include/uv.h
12
include/uv.h
@ -1161,7 +1161,7 @@ struct uv_timer_s {
|
||||
UV_TIMER_PRIVATE_FIELDS
|
||||
};
|
||||
|
||||
UV_EXTERN int uv_timer_init(uv_loop_t*, uv_timer_t* timer);
|
||||
UV_EXTERN int uv_timer_init(uv_loop_t*, uv_timer_t* handle);
|
||||
|
||||
/*
|
||||
* Start the timer. `timeout` and `repeat` are in milliseconds.
|
||||
@ -1175,19 +1175,19 @@ UV_EXTERN int uv_timer_init(uv_loop_t*, uv_timer_t* timer);
|
||||
* version of libuv. Don't pass in negative values, you'll get a nasty surprise
|
||||
* when that change becomes effective.
|
||||
*/
|
||||
UV_EXTERN int uv_timer_start(uv_timer_t* timer,
|
||||
UV_EXTERN int uv_timer_start(uv_timer_t* handle,
|
||||
uv_timer_cb cb,
|
||||
int64_t timeout,
|
||||
int64_t repeat);
|
||||
|
||||
UV_EXTERN int uv_timer_stop(uv_timer_t* timer);
|
||||
UV_EXTERN int uv_timer_stop(uv_timer_t* handle);
|
||||
|
||||
/*
|
||||
* Stop the timer, and if it is repeating restart it using the repeat value
|
||||
* as the timeout. If the timer has never been started before it returns -1 and
|
||||
* sets the error to UV_EINVAL.
|
||||
*/
|
||||
UV_EXTERN int uv_timer_again(uv_timer_t* timer);
|
||||
UV_EXTERN int uv_timer_again(uv_timer_t* handle);
|
||||
|
||||
/*
|
||||
* Set the repeat value in milliseconds. Note that if the repeat value is set
|
||||
@ -1195,9 +1195,9 @@ UV_EXTERN int uv_timer_again(uv_timer_t* timer);
|
||||
* non-repeating before, it will have been stopped. If it was repeating, then
|
||||
* the old repeat value will have been used to schedule the next timeout.
|
||||
*/
|
||||
UV_EXTERN void uv_timer_set_repeat(uv_timer_t* timer, int64_t repeat);
|
||||
UV_EXTERN void uv_timer_set_repeat(uv_timer_t* handle, int64_t repeat);
|
||||
|
||||
UV_EXTERN int64_t uv_timer_get_repeat(uv_timer_t* timer);
|
||||
UV_EXTERN int64_t uv_timer_get_repeat(uv_timer_t* handle);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user