Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::TimestampHandler Class Reference

Timestamp Handler. More...

#include <TimestampHandler.h>

Public Member Functions

 TimestampHandler (std::chrono::system_clock::time_point point) noexcept
 
uint64_t getCurrentTimestamp () noexcept
 
uint64_t tryGetCurrentTimestamp () noexcept
 

Protected Attributes

std::chrono::milliseconds latest {}
 

Detailed Description

Timestamp Handler.

Constructor & Destructor Documentation

◆ TimestampHandler()

sese::TimestampHandler::TimestampHandler ( std::chrono::system_clock::time_point point)
explicitnoexcept

Member Function Documentation

◆ getCurrentTimestamp()

uint64_t sese::TimestampHandler::getCurrentTimestamp ( )
noexcept

Get the current timestamp

Returns
Millisecond-level timestamp

References latest.

◆ tryGetCurrentTimestamp()

uint64_t sese::TimestampHandler::tryGetCurrentTimestamp ( )
noexcept

Try to get the current timestamp

Return values
0System clock rollback, and rollback time is less than or equal to 5 seconds
UINT64_MAXSystem clock rollback, and rollback time is greater than 5 seconds

Member Data Documentation

◆ latest

std::chrono::milliseconds sese::TimestampHandler::latest {}
protected

Referenced by getCurrentTimestamp().


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