class SessionClock : private nn::nex::DuplicatedObject
Class that provides synchronized time for the session.
The time (session clock) provided by the SessionClock
class is synchronized among all participants who have joined a given session. The session clock is automatically initialized to 0 when the session master calls the Session::CreateSession
function. The session master can change the time provided by this class by calling the SetTime
function.
The session clock can be used to synchronize and compare events among different participants. To get the time on a single machine, use the SystemClock
or Chrono
functions. Session clocks that are not properly synchronized can have an adverse effect on several NetZ systems (particularly on dead reckoning).
The session clock difference errors are due to latency (the lag for a message to reach its recipient) and jitter (variation in latency). The time synchronization algorithm assumes that the latency between two stations is symmetrical. An error will therefore arise in session clock time when there is asymmetrical latency between two stations. Asymmetrical latency sometimes occurs due to a delay in the synchronization pulse caused when a participating station executes other additional tasks (such as loading a file).
For more information about the session clock, see the NEX Programming Manual.
S | s_uiDefaultMinimumNbSyncPulse | The default value for the initial number of synchronization pulses (5). |
---|---|---|
S |
s_tiDefaultSyncPulseDelay
|
The default interval for sending synchronization pulses (2000 msec). |
S |
GetTime
|
Gets the session clock. |
---|---|---|
S |
SetTime
|
Sets the current session clock value. |
S |
SetDefaultMedianSize
|
Sets how far back in the past to use values when calculating a median value for session clock synchronization measurement results. |
S |
GetDefaultMedianSize
|
Gets how far back in the past values are used when calculating a median value for the session clock synchronization measurement results. |
SessionClock
|
Do not call this constructor. | |
V |
OperationEnd
|
Called every time a duplicated object system operation ends. |
V |
~SessionClock
|
Do not call this destructor. |
nn::nex::DuplicatedObject
nn::nex::SessionClock
CONFIDENTIAL