armarx::core::time Namespace Reference

Namespaces

namespace  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 class  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 class 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 9 of file ClockType.h.

Function Documentation

◆ from_json() [1/4]

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

Definition at line 18 of file json_conversions.cpp.

◆ from_json() [2/4]

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

Definition at line 59 of file json_conversions.cpp.

◆ from_json() [3/4]

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

Definition at line 31 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 44 of file json_conversions.cpp.

◆ fromIce() [1/6]

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

Definition at line 11 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 77 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 51 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 63 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 107 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 95 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 223 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 230 of file Frequency.cpp.

◆ operator/() [3/3]

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

Definition at line 236 of file Frequency.cpp.

◆ operator<<() [1/3]

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

Definition at line 202 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 395 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 241 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 50 of file json_conversions.cpp.

+ Here is the call graph for this function:

◆ to_json() [3/4]

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

Definition at line 24 of file json_conversions.cpp.

+ Here is the call graph for this function:

◆ to_json() [4/4]

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

Definition at line 37 of file json_conversions.cpp.

+ Here is the call graph for this function:

◆ toIce() [1/6]

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

Definition at line 31 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 87 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 57 of file ice_conversions.cpp.

+ Here is the call graph for this function:

◆ toIce() [4/6]

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

Definition at line 71 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 115 of file ice_conversions.cpp.

+ Here is the call graph for this function:

◆ toIce() [6/6]

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

Definition at line 101 of file ice_conversions.cpp.

+ Here is the call graph for this function:

Variable Documentation

◆ ClockTypeNames

const simox::meta::EnumNames< time::ClockType > ClockTypeNames
extern
Initial value:
{
{ClockType::Realtime, "Realtime"},
{ClockType::Monotonic, "Monotonic"},
{ClockType::Virtual, "Virtual"},
{ClockType::Unknown, "Unknown"},
}
@ Monotonic
Monotonic/steady clock of the operating system.
Definition ClockType.h:14
@ Virtual
Time given by time server if configured, realtime otherwise.
Definition ClockType.h:16
@ Unknown
Unknown source of time.
Definition ClockType.h:18
@ Realtime
Normalized time as reported by the operating system.
Definition ClockType.h:12

Definition at line 6 of file ClockTypeNames.cpp.