Function timeout

Synopsis

#include <src/uvw/loop.h>

std::pair< bool, Time > timeout() const noexcept

Description

Gets the poll timeout.

Returns
A std::pair composed as it follows:
  • A boolean value that is true in case of valid timeout, false otherwise.
  • Milliseconds (std::chrono::duration<uint64_t, std::milli>).

Source

Lines 94-97 in src/uvw/loop.cpp. Line 234 in src/uvw/loop.h.

UVW_INLINE std::pair<bool, Loop::Time> Loop::timeout() const noexcept {
    auto to = uv_backend_timeout(loop.get());
    return std::make_pair(to == -1, Time{to});
}





Add Discussion as Guest

Log in