Time Shield Library
C++ library for working with time
Loading...
Searching...
No Matches
time_shield::detail::NtpClientCore Class Reference

Core NTP query logic that parses packets and computes offsets. More...

#include <ntp_client_core.hpp>

Public Member Functions

bool query (IUdpTransport &transport, const std::string &host, int port, int timeout_ms, int &out_error_code, int64_t &out_offset_us, int64_t &out_delay_us, int &out_stratum) noexcept
 Perform one NTP transaction using a UDP transport.
 

Static Private Member Functions

static bool get_now_us (uint64_t &out) noexcept
 Read current realtime clock in microseconds.
 

Detailed Description

Core NTP query logic that parses packets and computes offsets.

Definition at line 16 of file ntp_client_core.hpp.

Member Function Documentation

◆ get_now_us()

static bool time_shield::detail::NtpClientCore::get_now_us ( uint64_t & out)
inlinestaticprivatenoexcept

Read current realtime clock in microseconds.

Definition at line 76 of file ntp_client_core.hpp.

◆ query()

bool time_shield::detail::NtpClientCore::query ( IUdpTransport & transport,
const std::string & host,
int port,
int timeout_ms,
int & out_error_code,
int64_t & out_offset_us,
int64_t & out_delay_us,
int & out_stratum )
inlinenoexcept

Perform one NTP transaction using a UDP transport.

Definition at line 19 of file ntp_client_core.hpp.


The documentation for this class was generated from the following file: