BlueZero (BØ)
Middleware for distributed applications
Public Member Functions | List of all members
b0::TimeSync Class Reference

The TimeSync class. More...

#include <b0/utils/time_sync.h>

Public Member Functions

 TimeSync (double max_slope=0.5)
 TimeSync constructor. More...
 
virtual ~TimeSync ()
 TimeSync destructor.
 
virtual int64_t hardwareTimeUSec () const
 Return this computer's clock time in microseconds.
 
virtual int64_t timeUSec ()
 Return the adjusted time in microseconds. See Time Synchronization for details.
 
virtual int64_t constantRateAdjustedOffset ()
 
virtual void updateTime (int64_t remoteTime)
 

Detailed Description

The TimeSync class.

Handles the time synchronization aspects of the Node class.

Constructor & Destructor Documentation

◆ TimeSync()

b0::TimeSync::TimeSync ( double  max_slope = 0.5)

TimeSync constructor.

Parameters
max_slopeIndicates the maximum correction speed (in adjusted seconds per real second). Always keep this strictly greater than 0 and strictly less than 1.

Member Function Documentation

◆ constantRateAdjustedOffset()

virtual int64_t b0::TimeSync::constantRateAdjustedOffset ( )
virtual

Compute a smoothed offset with a linear velocity profile with a slope never greater (in absolute value) than max_slope

◆ updateTime()

virtual void b0::TimeSync::updateTime ( int64_t  remoteTime)
virtual

Update the time offset with a time from remote server (in microseconds)


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