LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Types | Public Member Functions | List of all members
rcsc::TimeStamp Class Reference

wrapper class of the system time point More...

#include <timer.h>

Public Types

typedef std::chrono::system_clock::time_point value_type
 

Public Member Functions

 TimeStamp ()
 construct an invalid time stamp instance. time_point is initialized with duration::zero()
 
 TimeStamp (const value_type &tp)
 construct with the given time point More...
 
bool isValid () const
 
void setNow ()
 update to the current time point
 
const value_type & timePoint () const
 get the time point value More...
 
std::int64_t elapsedSince (const TimeStamp &other) const
 get the milliseconds value since the given time stamp More...
 

Detailed Description

wrapper class of the system time point

Constructor & Destructor Documentation

◆ TimeStamp()

rcsc::TimeStamp::TimeStamp ( const value_type &  tp)
inlineexplicit

construct with the given time point

Parameters
tptime point

Member Function Documentation

◆ elapsedSince()

std::int64_t rcsc::TimeStamp::elapsedSince ( const TimeStamp other) const
inline

get the milliseconds value since the given time stamp

Returns
count value in the order of millisecond

◆ timePoint()

const value_type & rcsc::TimeStamp::timePoint ( ) const
inline

get the time point value

Returns
const reference to the time_point instance

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