A simple time structure. All time values are UTC.
More...
#include <time.h>
List of all members.
Detailed Description
A simple time structure. All time values are UTC.
Definition at line 60 of file time.h.
Member Typedef Documentation
Typedef for a list of Time Stamp.
Definition at line 65 of file time.h.
Typedef to store Time Stamp.
Definition at line 64 of file time.h.
Constructor & Destructor Documentation
Time::Time |
( |
const bool |
setCurrentTime = false ) |
|
Constructor.
- Parameters:
-
setCurrentTime | If true, initialized with current UTM time. |
Definition at line 290 of file time.cpp.
Time::Time |
( |
const Time & |
time ) |
|
Copy constructor.
Definition at line 310 of file time.cpp.
CxUtils::Time::Time |
( |
const double |
seconds ) |
[inline] |
Time::~Time |
( |
) |
[virtual] |
Member Function Documentation
Time Time::Add |
( |
const Time & |
t1, |
|
|
const Time & |
t2 |
|
) |
| [static] |
- Returns:
- The result of t1 + t2 in a Time object.
Definition at line 554 of file time.cpp.
Time CxUtils::Time::Add |
( |
const Time & |
time ) |
const [inline] |
void CxUtils::Time::Clear |
( |
) |
[inline] |
static double CxUtils::Time::DifferenceInMs |
( |
const Time & |
a, |
|
|
const Time & |
b |
|
) |
| [inline, static] |
static double CxUtils::Time::DifferenceInSeconds |
( |
const Time & |
a, |
|
|
const Time & |
b |
|
) |
| [inline, static] |
Time & Time::FromString |
( |
const std::string & |
str ) |
|
Reads time data from a formatted string.
Definition at line 449 of file time.cpp.
Time Time::GetExternalTime |
( |
) |
[static] |
- Returns:
- The time data from any external time source (if available).
Definition at line 603 of file time.cpp.
static Time CxUtils::Time::GetLocalTime |
( |
) |
[inline, static] |
- Returns:
- The current local time in milliseconds.
Definition at line 421 of file time.cpp.
static Time CxUtils::Time::GetUtcTime |
( |
) |
[inline, static] |
- Returns:
- The current UTC time in milliseconds.
Definition at line 410 of file time.cpp.
static bool CxUtils::Time::HaveExternalTime |
( |
) |
[inline, static] |
bool CxUtils::Time::operator!= |
( |
const Time & |
time ) |
const [inline] |
bool CxUtils::Time::operator!= |
( |
const double |
seconds ) |
const [inline] |
bool CxUtils::Time::operator!= |
( |
const Stamp |
milliseconds ) |
const [inline] |
double CxUtils::Time::operator- |
( |
const Time & |
time ) |
const [inline] |
- Returns:
- Difference in time in seconds.
Definition at line 167 of file time.h.
bool CxUtils::Time::operator< |
( |
const Time & |
time ) |
const [inline] |
bool CxUtils::Time::operator<= |
( |
const Time & |
time ) |
const [inline] |
Time & Time::operator= |
( |
const Time & |
time ) |
|
Sets equal to.
Definition at line 537 of file time.cpp.
Time& CxUtils::Time::operator= |
( |
const double & |
seconds ) |
[inline] |
bool CxUtils::Time::operator== |
( |
const Time & |
time ) |
const [inline] |
bool CxUtils::Time::operator== |
( |
const double |
seconds ) |
const [inline] |
bool CxUtils::Time::operator== |
( |
const Stamp |
milliseconds ) |
const [inline] |
bool CxUtils::Time::operator> |
( |
const Time & |
time ) |
const [inline] |
bool CxUtils::Time::operator>= |
( |
const Time & |
time ) |
const [inline] |
void Time::SetCurrentTime |
( |
) |
|
void Time::SetLocalTime |
( |
) |
|
Sets the current local time.
Definition at line 350 of file time.cpp.
Time Time::Subtract |
( |
const Time & |
t1, |
|
|
const Time & |
t2 |
|
) |
| [static] |
- Returns:
- The result of t1 - t2 in a Time object.
Definition at line 591 of file time.cpp.
Time CxUtils::Time::Subtract |
( |
const Time & |
time ) |
const [inline] |
Converts the time data to a value in milliseconds.
Definition at line 380 of file time.cpp.
double Time::ToSeconds |
( |
) |
const |
Converts the time data to a value in seconds.
Definition at line 395 of file time.cpp.
std::string Time::ToString |
( |
) |
const |
Converts time to a string format.
Definition at line 434 of file time.cpp.
Friends And Related Function Documentation
Member Data Documentation
Day of the month.
Definition at line 170 of file time.h.
Hour of the day [0,11].
Definition at line 171 of file time.h.
Milliseconds [0,999].
Definition at line 174 of file time.h.
Minute [0,59].
Definition at line 172 of file time.h.
Second [0,59].
Definition at line 173 of file time.h.
The documentation for this class was generated from the following files:
- C:/Active/libraries/cxutils/2.0/include/cxutils/time.h
- C:/Active/libraries/cxutils/2.0/src/cxutils/time.cpp