diff --git a/include/uv.h b/include/uv.h index 92cce2a152..d4566268b9 100644 --- a/include/uv.h +++ b/include/uv.h @@ -345,7 +345,7 @@ UV_EXTERN void uv_update_time(uv_loop_t*); * * Use uv_hrtime() if you need sub-millisecond granularity. */ -UV_EXTERN uint64_t uv_now(uv_loop_t*); +UV_EXTERN uint64_t uv_now(const uv_loop_t*); /* * Get backend file descriptor. Only kqueue, epoll and event ports are diff --git a/src/uv-common.c b/src/uv-common.c index a7a3f74c18..96f66d6d33 100644 --- a/src/uv-common.c +++ b/src/uv-common.c @@ -384,7 +384,7 @@ void uv_stop(uv_loop_t* loop) { } -uint64_t uv_now(uv_loop_t* loop) { +uint64_t uv_now(const uv_loop_t* loop) { return loop->time; }