unix, windows: make uv_now() return uint64_t
Using int64_t doesn't make sense here because the return value is never negative.
This commit is contained in:
parent
6bf1a56e9d
commit
d6bfedb862
@ -277,7 +277,7 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
|
||||
/* The loop's I/O completion port */ \
|
||||
HANDLE iocp; \
|
||||
/* The current time according to the event loop. in msecs. */ \
|
||||
int64_t time; \
|
||||
uint64_t time; \
|
||||
/* Tail of a single-linked circular queue of pending reqs. If the queue */ \
|
||||
/* is empty, tail_ is NULL. If there is only one item, */ \
|
||||
/* tail_->next_req == tail_ */ \
|
||||
|
||||
@ -266,7 +266,7 @@ UV_EXTERN void uv_ref(uv_handle_t*);
|
||||
UV_EXTERN void uv_unref(uv_handle_t*);
|
||||
|
||||
UV_EXTERN void uv_update_time(uv_loop_t*);
|
||||
UV_EXTERN int64_t uv_now(uv_loop_t*);
|
||||
UV_EXTERN uint64_t uv_now(uv_loop_t*);
|
||||
|
||||
/*
|
||||
* Get backend file descriptor. Only kqueue, epoll and event ports are
|
||||
|
||||
@ -306,7 +306,7 @@ void uv_update_time(uv_loop_t* loop) {
|
||||
}
|
||||
|
||||
|
||||
int64_t uv_now(uv_loop_t* loop) {
|
||||
uint64_t uv_now(uv_loop_t* loop) {
|
||||
return loop->time;
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ void uv_update_time(uv_loop_t* loop) {
|
||||
}
|
||||
|
||||
|
||||
int64_t uv_now(uv_loop_t* loop) {
|
||||
uint64_t uv_now(uv_loop_t* loop) {
|
||||
return loop->time;
|
||||
}
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ static int repeat_2_cb_allowed = 0;
|
||||
|
||||
static uv_timer_t dummy, repeat_1, repeat_2;
|
||||
|
||||
static int64_t start_time;
|
||||
static uint64_t start_time;
|
||||
|
||||
|
||||
static void close_cb(uv_handle_t* handle) {
|
||||
|
||||
@ -29,7 +29,7 @@ static int repeat_cb_called = 0;
|
||||
static int repeat_close_cb_called = 0;
|
||||
static int order_cb_called = 0;
|
||||
|
||||
static int64_t start_time;
|
||||
static uint64_t start_time;
|
||||
|
||||
|
||||
static void once_close_cb(uv_handle_t* handle) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user