armarx::core::time Namespace Reference

Namespaces

 dto
 

Classes

class  Clock
 Clock to get date/time from a specific clock type or wait for certain durations or until certain date/times in a given clock. More...
 
class  DateTime
 Represents a point in time. More...
 
class  Duration
 Represents a duration. More...
 
class  Frequency
 Represents a frequency. More...
 
class  Metronome
 Simple rate limiter for use in loops to maintain a certain frequency given a clock. More...
 
class  ScopedStopWatch
 Measures the time this stop watch was inside the current scope. More...
 
class  StopWatch
 Measures the passed time between the construction or calling reset() and stop(). More...
 

Enumerations

enum  ClockType { Realtime, Monotonic, Virtual, Unknown }
 Describes the type of clock. More...
 

Functions

void from_json (const simox::json::json &j, ClockType &bo)
 
void from_json (const simox::json::json &j, DateTime &bo)
 
void from_json (const simox::json::json &j, Duration &bo)
 
void from_json (const simox::json::json &j, Frequency &bo)
 
void fromIce (const dto::ClockType::ClockTypeEnum &dto, ClockType &bo)
 
void fromIce (const dto::DateTime &dto, DateTime &bo)
 
void fromIce (const dto::Duration &dto, Duration &bo)
 
void fromIce (const dto::Frequency &dto, Frequency &bo)
 
void fromIce (const IceUtil::Time &dto, DateTime &bo)
 
void fromIce (const IceUtil::Time &dto, Duration &bo)
 
Frequency operator/ (const double cyclesPerDuration, const Duration &duration)
 
Frequency operator/ (const int cyclesPerDuration, const Duration &duration)
 
Frequency operator/ (const std::int64_t cyclesPerDuration, const Duration &duration)
 
std::ostream & operator<< (std::ostream &out, const DateTime &rhs)
 
std::ostream & operator<< (std::ostream &out, const Duration &rhs)
 
std::ostream & operator<< (std::ostream &out, const Frequency &rhs)
 
void to_json (simox::json::json &j, const ClockType &bo)
 
void to_json (simox::json::json &j, const DateTime &bo)
 
void to_json (simox::json::json &j, const Duration &bo)
 
void to_json (simox::json::json &j, const Frequency &bo)
 
void toIce (dto::ClockType::ClockTypeEnum &dto, const ClockType &bo)
 
void toIce (dto::DateTime &dto, const DateTime &bo)
 
void toIce (dto::Duration &dto, const Duration &bo)
 
void toIce (dto::Frequency &dto, const Frequency &bo)
 
void toIce (IceUtil::Time &dto, const DateTime &bo)
 
void toIce (IceUtil::Time &dto, const Duration &bo)
 

Variables

const simox::meta::EnumNames< ClockTypeClockTypeNames
 

Enumeration Type Documentation

◆ ClockType

enum ClockType
strong

Describes the type of clock.

Enumerator
Realtime 

Normalized time as reported by the operating system.

Monotonic 

Monotonic/steady clock of the operating system.

Virtual 

Time given by time server if configured, realtime otherwise.

Unknown 

Unknown source of time.

Definition at line 10 of file ClockType.h.

Function Documentation

◆ from_json() [1/4]

void from_json ( const simox::json::json &  j,
ClockType bo 
)

Definition at line 17 of file json_conversions.cpp.

◆ from_json() [2/4]

void from_json ( const simox::json::json &  j,
DateTime bo 
)

Definition at line 52 of file json_conversions.cpp.

◆ from_json() [3/4]

void from_json ( const simox::json::json &  j,
Duration bo 
)

Definition at line 28 of file json_conversions.cpp.

+ Here is the call graph for this function:

◆ from_json() [4/4]

void from_json ( const simox::json::json &  j,
Frequency bo 
)

Definition at line 39 of file json_conversions.cpp.

◆ fromIce() [1/6]

void fromIce ( const dto::ClockType::ClockTypeEnum &  dto,
ClockType bo 
)

Definition at line 12 of file ice_conversions.cpp.

+ Here is the caller graph for this function:

◆ fromIce() [2/6]

void fromIce ( const dto::DateTime &  dto,
DateTime bo 
)

Definition at line 84 of file ice_conversions.cpp.

+ Here is the call graph for this function:

◆ fromIce() [3/6]

void fromIce ( const dto::Duration &  dto,
Duration bo 
)

Definition at line 54 of file ice_conversions.cpp.

+ Here is the call graph for this function:

◆ fromIce() [4/6]

void fromIce ( const dto::Frequency &  dto,
Frequency bo 
)

Definition at line 68 of file ice_conversions.cpp.

+ Here is the call graph for this function:

◆ fromIce() [5/6]

void fromIce ( const IceUtil::Time &  dto,
DateTime bo 
)

Definition at line 118 of file ice_conversions.cpp.

+ Here is the call graph for this function:

◆ fromIce() [6/6]

void fromIce ( const IceUtil::Time &  dto,
Duration bo 
)

Definition at line 104 of file ice_conversions.cpp.

+ Here is the call graph for this function:

◆ operator/() [1/3]

Frequency operator/ ( const double  cyclesPerDuration,
const Duration duration 
)

Definition at line 255 of file Frequency.cpp.

+ Here is the call graph for this function:

◆ operator/() [2/3]

Frequency operator/ ( const int  cyclesPerDuration,
const Duration duration 
)

Definition at line 263 of file Frequency.cpp.

◆ operator/() [3/3]

Frequency operator/ ( const std::int64_t  cyclesPerDuration,
const Duration duration 
)

Definition at line 270 of file Frequency.cpp.

◆ operator<<() [1/3]

std::ostream & operator<< ( std::ostream &  out,
const DateTime rhs 
)

Definition at line 226 of file DateTime.cpp.

+ Here is the call graph for this function:

◆ operator<<() [2/3]

std::ostream & operator<< ( std::ostream &  out,
const Duration rhs 
)

Definition at line 451 of file Duration.cpp.

+ Here is the call graph for this function:

◆ operator<<() [3/3]

std::ostream & operator<< ( std::ostream &  out,
const Frequency rhs 
)

Definition at line 277 of file Frequency.cpp.

+ Here is the call graph for this function:

◆ to_json() [1/4]

void to_json ( simox::json::json &  j,
const ClockType bo 
)

Definition at line 12 of file json_conversions.cpp.

◆ to_json() [2/4]

void to_json ( simox::json::json &  j,
const DateTime bo 
)

Definition at line 44 of file json_conversions.cpp.

◆ to_json() [3/4]

void to_json ( simox::json::json &  j,
const Duration bo 
)

Definition at line 22 of file json_conversions.cpp.

◆ to_json() [4/4]

void to_json ( simox::json::json &  j,
const Frequency bo 
)

Definition at line 33 of file json_conversions.cpp.

◆ toIce() [1/6]

void toIce ( dto::ClockType::ClockTypeEnum &  dto,
const ClockType bo 
)

Definition at line 33 of file ice_conversions.cpp.

+ Here is the caller graph for this function:

◆ toIce() [2/6]

void toIce ( dto::DateTime &  dto,
const DateTime bo 
)

Definition at line 95 of file ice_conversions.cpp.

+ Here is the call graph for this function:

◆ toIce() [3/6]

void toIce ( dto::Duration &  dto,
const Duration bo 
)

Definition at line 61 of file ice_conversions.cpp.

◆ toIce() [4/6]

void toIce ( dto::Frequency &  dto,
const Frequency bo 
)

Definition at line 77 of file ice_conversions.cpp.

+ Here is the call graph for this function:

◆ toIce() [5/6]

void toIce ( IceUtil::Time &  dto,
const DateTime bo 
)

Definition at line 127 of file ice_conversions.cpp.

◆ toIce() [6/6]

void toIce ( IceUtil::Time &  dto,
const Duration bo 
)

Definition at line 111 of file ice_conversions.cpp.

Variable Documentation

◆ ClockTypeNames

const simox::meta::EnumNames< time::ClockType > ClockTypeNames
Initial value:
{
{ ClockType::Realtime, "Realtime" },
{ ClockType::Monotonic, "Monotonic" },
{ ClockType::Virtual, "Virtual" },
{ ClockType::Unknown, "Unknown" },
}

Definition at line 9 of file ClockTypeNames.cpp.