From 87ae69b6387fcebd75e4d733d3a95f8497d8ca45 Mon Sep 17 00:00:00 2001 From: Rasmus Christian Pedersen Date: Mon, 28 Apr 2014 21:38:44 +0200 Subject: [PATCH] unix, windows: uv_now constness uv_now doesnt require modification of uv_loop_t as such argument is changed to a const uv_loop_t* as this more in spirit with remaining API in libuv. --- include/uv.h | 2 +- src/uv-common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uv.h b/include/uv.h index 92cce2a1..d4566268 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 a7a3f74c..96f66d6d 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; }