iRoCS Toolbox  1.1.0
Static Public Member Functions
atb::MyDateTime Class Reference

The MyDateTime struct provides pretty printed date - time strings with microsecond resolution. More...

#include <ATBTiming.hh>

Collaboration diagram for atb::MyDateTime:

Static Public Member Functions

static std::string prettyDate ()
 Get a pretty printed version of the current system date and time. More...
 
static std::string prettyTime ()
 Timestamp relative to system boot in microsecond accuracy of the form xxxxxxxxxxxx.xxxxxx (s.mus). More...
 
static std::string prettyTime (long long time_us)
 Get a pretty printed version of the given time in microseconds as hh:mm:ss.mmm,uuu. More...
 
static long long time_us ()
 Get the elapsed microseconds since system boot. More...
 

Detailed Description

The MyDateTime struct provides pretty printed date - time strings with microsecond resolution.

This struct provides pretty printed versions of the current system time in two formats: microseconds since system start, current date and time in the following format: Weekday Month Day Time Year

Definition at line 55 of file ATBTiming.hh.

Member Function Documentation

◆ prettyTime() [1/2]

static std::string atb::MyDateTime::prettyTime ( )
static

Timestamp relative to system boot in microsecond accuracy of the form xxxxxxxxxxxx.xxxxxx (s.mus).

The timestamps are pre-padded with zeros, to make them string-sortable.

Returns
timestamp string in microseconds

◆ time_us()

static long long atb::MyDateTime::time_us ( )
static

Get the elapsed microseconds since system boot.

Returns
microseconds since system boot

◆ prettyDate()

static std::string atb::MyDateTime::prettyDate ( )
static

Get a pretty printed version of the current system date and time.

Returns
A pretty printed date-time string

◆ prettyTime() [2/2]

static std::string atb::MyDateTime::prettyTime ( long long  time_us)
static

Get a pretty printed version of the given time in microseconds as hh:mm:ss.mmm,uuu.

Returns
A pretty printed time string to the given microseconds

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