Search code examples
c++libuv

what does uv_loop_t.time represent?


In libuv's uv_loop_t, there is a private uint64 field called "time".

What does it represent?


Solution

  • libuv caches the current time at the start of the event loop tick in order to reduce the number of time-related system calls (see also).

    So time certainly is the current time cached when your event loop is started. You can retrieve this value though uv_now and update it using uv_update_time.