Table of Contents
N_CLOCK_SYNC
Module: CLOCK_SYNC: client/server clock offset estimation
clock synchronization estimator
#include "n_clock_sync.h"
Public Attributes
| Name | |
|---|---|
| int | synthetic TRUE while the buffer holds only a synthetic n_clock_sync_seed sample, flushed wholesale by the first real response so a low-synthetic-rtt seed can never pin the estimate on links whose real RTT exceeds the synthetic one. |
| int | sample_index current write position in circular buffer |
| int | sample_count number of samples collected so far |
| double[11] | rtt_samples circular buffer of RTT values |
| double[11] | offset_samples circular buffer of offset estimates |
| double | offset_prev effective offset at the moment estimated_offset last changed, the slew blends offset_prev -> estimated_offset |
| double | offset_change_time local time at which estimated_offset last changed |
| double | last_sync_time local time of last sync request sent |
| double | estimated_rtt current estimated round-trip time |
| double | estimated_offset add to local time to get estimated server time (raw best-RTT target, n_clock_sync_server_time applies the slew on top) |
Public Attributes Documentation
variable synthetic
int synthetic;
TRUE while the buffer holds only a synthetic n_clock_sync_seed sample, flushed wholesale by the first real response so a low-synthetic-rtt seed can never pin the estimate on links whose real RTT exceeds the synthetic one.
variable sample_index
int sample_index;
current write position in circular buffer
variable sample_count
int sample_count;
number of samples collected so far
variable rtt_samples
double[11] rtt_samples;
circular buffer of RTT values
variable offset_samples
double[11] offset_samples;
circular buffer of offset estimates
variable offset_prev
double offset_prev;
effective offset at the moment estimated_offset last changed, the slew blends offset_prev -> estimated_offset
variable offset_change_time
double offset_change_time;
local time at which estimated_offset last changed
variable last_sync_time
double last_sync_time;
local time of last sync request sent
variable estimated_rtt
double estimated_rtt;
current estimated round-trip time
variable estimated_offset
double estimated_offset;
add to local time to get estimated server time (raw best-RTT target, n_clock_sync_server_time applies the slew on top)
Modules
- AABB3D
- ACCEPT_POOL
- ALLEGRO4
- ALLEGRO5
- ANIM_LIB
- ASTAR
- ATLAS_LIB
- AVRO
- CLOCK_SYNC
- COMMONS
- CONFIGFILE
- CYPHER_BASE64
- CYPHER_VIGENERE
- DEAD_RECKONING
- ENUMS
- EXCEPTIONS
- GAME_ENV
- GIT
- GUI
- HASH_TABLE
- ISOMETRIC_ENGINE
- LIST
- LOG
- LOGNODUP
- LZ4
- NETWORKING
- NETWORK_MSG
- N_COOKIES
- N_DIFF
- N_DIGEST
- N_DISK_CACHE
- N_DNS
- N_ECC
- N_ENTROPY
- N_FILES
- N_FLUIDS
- N_GUI_COLOR
- N_GUI_COLORWHEEL
- N_GUI_CURVE
- N_GUI_GRID
- N_GUI_POPUP
- N_HEX
- N_HTTP3
- N_HTTP_COOKIE
- N_HTTP_FORM
- N_HTTP_MIME
- N_HTTP_REQ
- N_HTTP_RESP
- N_HTTP_ROUTER
- N_HTTP_SERVER
- N_ICC
- N_JSON
- N_KAFKA
- N_LINALG
- N_MODULE
- N_OPENSSL_COMPAT
- N_PRETTY
- N_PTH
- N_QUERY
- N_RANDOM
- N_SHA256
- N_STR
- N_TIFF
- N_TIME
- N_USER
- N_X509
- N_ZIP
- PARTICLES
- PCRE
- PHYSICS
- SIGNALS
- STACK
- THREADS
- TRAJECTORY
- TREE
- ZLIB