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< ClockType > ClockTypeNames
 

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.

Function Documentation

◆ from_json() [1/4]

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

◆ from_json() [2/4]

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

◆ from_json() [3/4]

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

◆ from_json() [4/4]

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

◆ fromIce() [1/6]

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

◆ fromIce() [2/6]

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

◆ fromIce() [3/6]

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

◆ fromIce() [4/6]

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

◆ fromIce() [5/6]

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

◆ fromIce() [6/6]

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

◆ operator/() [1/3]

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

◆ operator/() [2/3]

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

◆ operator/() [3/3]

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

◆ operator<<() [1/3]

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

◆ operator<<() [2/3]

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

◆ operator<<() [3/3]

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

◆ to_json() [1/4]

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

◆ to_json() [2/4]

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

◆ to_json() [3/4]

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

◆ to_json() [4/4]

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

◆ toIce() [1/6]

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

◆ toIce() [2/6]

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

◆ toIce() [3/6]

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

◆ toIce() [4/6]

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

◆ toIce() [5/6]

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

◆ toIce() [6/6]

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

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