Time Shield Library
C++ library for working with time
Loading...
Searching...
No Matches
time_shield::NtpPoolConfig Struct Reference

Pool configuration. More...

#include <ntp_client_pool.hpp>

Public Types

enum class  Aggregation { Median , BestDelay , MedianMadTrim }
 Aggregation strategy for offset estimation. More...
 

Public Attributes

std::size_t sample_servers = 5
 Number of servers to sample per measurement.
 
std::size_t min_valid_samples = 3
 Minimum number of valid samples required to update offset.
 
enum time_shield::NtpPoolConfig::Aggregation aggregation = Aggregation::Median
 
double smoothing_alpha = 1.0
 Exponential smoothing factor for offset updates.
 
std::uint64_t rng_seed = 0
 Random seed for server sampling; 0 uses time-based seed.
 

Detailed Description

Pool configuration.

Definition at line 53 of file ntp_client_pool.hpp.

Member Enumeration Documentation

◆ Aggregation

Aggregation strategy for offset estimation.

Enumerator
Median 
BestDelay 
MedianMadTrim 

Definition at line 58 of file ntp_client_pool.hpp.

Member Data Documentation

◆ aggregation

enum time_shield::NtpPoolConfig::Aggregation time_shield::NtpPoolConfig::aggregation = Aggregation::Median

◆ min_valid_samples

std::size_t time_shield::NtpPoolConfig::min_valid_samples = 3

Minimum number of valid samples required to update offset.

Definition at line 55 of file ntp_client_pool.hpp.

◆ rng_seed

std::uint64_t time_shield::NtpPoolConfig::rng_seed = 0

Random seed for server sampling; 0 uses time-based seed.

Definition at line 65 of file ntp_client_pool.hpp.

◆ sample_servers

std::size_t time_shield::NtpPoolConfig::sample_servers = 5

Number of servers to sample per measurement.

Definition at line 54 of file ntp_client_pool.hpp.

◆ smoothing_alpha

double time_shield::NtpPoolConfig::smoothing_alpha = 1.0

Exponential smoothing factor for offset updates.

Definition at line 64 of file ntp_client_pool.hpp.


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