summaryrefslogtreecommitdiff
path: root/deps/uv/include/uv.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/uv/include/uv.h')
-rw-r--r--deps/uv/include/uv.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h
index a3ebaa40b5..f51aea60f2 100644
--- a/deps/uv/include/uv.h
+++ b/deps/uv/include/uv.h
@@ -283,7 +283,28 @@ UV_EXTERN void uv_ref(uv_handle_t*);
UV_EXTERN void uv_unref(uv_handle_t*);
UV_EXTERN int uv_has_ref(const uv_handle_t*);
+/*
+ * Update the event loop's concept of "now". Libuv caches the current time
+ * at the start of the event loop tick in order to reduce the number of
+ * time-related system calls.
+ *
+ * You won't normally need to call this function unless you have callbacks
+ * that block the event loop for longer periods of time, where "longer" is
+ * somewhat subjective but probably on the order of a millisecond or more.
+ */
UV_EXTERN void uv_update_time(uv_loop_t*);
+
+/*
+ * Return the current timestamp in milliseconds. The timestamp is cached at
+ * the start of the event loop tick, see |uv_update_time()| for details and
+ * rationale.
+ *
+ * The timestamp increases monotonically from some arbitrary point in time.
+ * Don't make assumptions about the starting point, you will only get
+ * disappointed.
+ *
+ * Use uv_hrtime() if you need sub-milliseond granularity.
+ */
UV_EXTERN uint64_t uv_now(uv_loop_t*);
/*