Function now


#include <src/uvw/loop.h>

Time now() const noexcept


Returns the current timestamp in milliseconds.

The timestamp is cached at the start of the event loop tick.
The timestamp increases monotonically from some arbitrary point in time.
Don’t make assumptions about the starting point, you will only get disappointed.

The current timestamp in milliseconds (actual type is std::chrono::duration<uint64_t, std::milli>).


Lines 105-107 in src/uvw/loop.cpp. Line 255 in src/uvw/loop.h.

UVW_INLINE Loop::Time Loop::now() const noexcept {
    return Time{uv_now(loop.get())};

Add Discussion as Guest

Log in