|
|
Represents a point in time. More...
#include <ArmarXCore/core/time/DateTime.h>
Public Member Functions | |
| ClockType | clockType () const |
| DateTime () | |
| DateTime (const IceUtil::Time &ice) | |
| DateTime (Duration timeSinceEpoch, ClockType clock=ClockType::Virtual, const std::string &hostname="unknown") | |
| DateTime (std::int64_t microSecondsSinceEpoch, ClockType clock=ClockType::Virtual, const std::string &hostname="unknown") | |
| std::string | hostname () const |
| bool | isInvalid () const |
| bool | isValid () const |
| operator IceUtil::Time () const | |
| bool | operator!= (const DateTime &rhs) const |
| DateTime | operator+ (const Duration &rhs) const |
| DateTime & | operator+= (const Duration &rhs) |
| Duration | operator- (const DateTime &rhs) const |
| DateTime | operator- (const Duration &rhs) const |
| DateTime & | operator-= (const Duration &rhs) |
| bool | operator< (const DateTime &rhs) const |
| bool | operator<= (const DateTime &rhs) const |
| bool | operator== (const DateTime &rhs) const |
| bool | operator> (const DateTime &rhs) const |
| bool | operator>= (const DateTime &rhs) const |
| std::string | toDateString () const |
| std::string | toDateTimeString () const |
| Duration | toDurationSinceEpoch () const |
| std::int64_t | toMicroSeconds () const |
| std::int64_t | toMicroSecondsSinceEpoch () const |
| std::int64_t | toMilliSecondsSinceEpoch () const |
| std::int64_t | toSecondsSinceEpoch () const |
| std::string | toString (const std::string &format) const |
| String representation of current date time according to given format string. More... | |
| std::string | toTimeString () const |
Static Public Member Functions | |
| static DateTime | Invalid () |
| static DateTime | microSeconds (long microSeconds) |
| static DateTime | Now () |
| static DateTime | now () |
Protected Attributes | |
| ClockType | _clockType |
| std::string | _hostname |
| Duration | _timeSinceEpoch |
Static Protected Attributes | |
| static const Duration | _invalidTimeSinceEpoch |
Represents a point in time.
API and implementation to match IceUtil::Time (where applicable).
Definition at line 24 of file DateTime.h.
| DateTime | ( | ) |
| DateTime | ( | Duration | timeSinceEpoch, |
| ClockType | clock = ClockType::Virtual, |
||
| const std::string & | hostname = "unknown" |
||
| ) |
Definition at line 22 of file DateTime.cpp.
| DateTime | ( | std::int64_t | microSecondsSinceEpoch, |
| ClockType | clock = ClockType::Virtual, |
||
| const std::string & | hostname = "unknown" |
||
| ) |
| DateTime | ( | const IceUtil::Time & | ice | ) |
| ClockType clockType | ( | ) | const |
Definition at line 111 of file DateTime.cpp.
| std::string hostname | ( | ) | const |
Definition at line 117 of file DateTime.cpp.
|
static |
Definition at line 57 of file DateTime.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| bool isInvalid | ( | ) | const |
Definition at line 129 of file DateTime.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| bool isValid | ( | ) | const |
|
inlinestatic |
Definition at line 94 of file DateTime.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
inlinestatic |
Definition at line 87 of file DateTime.h.
Here is the call graph for this function:
Here is the caller graph for this function:| operator IceUtil::Time | ( | ) | const |
| bool operator!= | ( | const DateTime & | rhs | ) | const |
Definition at line 141 of file DateTime.cpp.
Definition at line 154 of file DateTime.cpp.
| bool operator< | ( | const DateTime & | rhs | ) | const |
| bool operator<= | ( | const DateTime & | rhs | ) | const |
| bool operator== | ( | const DateTime & | rhs | ) | const |
| bool operator> | ( | const DateTime & | rhs | ) | const |
| bool operator>= | ( | const DateTime & | rhs | ) | const |
| std::string toDateString | ( | ) | const |
Definition at line 63 of file DateTime.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::string toDateTimeString | ( | ) | const |
Definition at line 75 of file DateTime.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Duration toDurationSinceEpoch | ( | ) | const |
|
inline |
Definition at line 101 of file DateTime.h.
Here is the call graph for this function:
Here is the caller graph for this function:| std::int64_t toMicroSecondsSinceEpoch | ( | ) | const |
Definition at line 87 of file DateTime.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::int64_t toMilliSecondsSinceEpoch | ( | ) | const |
Definition at line 93 of file DateTime.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::int64_t toSecondsSinceEpoch | ( | ) | const |
Definition at line 99 of file DateTime.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::string toString | ( | const std::string & | format | ) | const |
String representation of current date time according to given format string.
The format is according to https://en.cppreference.com/w/cpp/chrono/c/strftime. For milli seconds and micro seconds, special specifiers "%%msec" and "%%usec" were added respectively.
Example format string for "2022-03-04_16-59-10.981789": "%Y-%m-%d_%H-%M-%S.%%usec".
| format | Format string. |
Definition at line 81 of file DateTime.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::string toTimeString | ( | ) | const |
Definition at line 69 of file DateTime.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 135 of file DateTime.h.
|
protected |
Definition at line 137 of file DateTime.h.
|
staticprotected |
Definition at line 131 of file DateTime.h.
|
protected |
Definition at line 133 of file DateTime.h.