#include <sim_time.hpp>
Public Member Functions | |
SimTime () | |
A constructor. | |
SimTime (double simTime) | |
A constructor. | |
void | setTimeInMicroSeconds (double timeInMicroSeconds) |
Set the internal time by specifying microseconds. | |
void | setTimeInMilliSeconds (double timeInMilliSeconds) |
Set the internal time by specifying milliseconds. | |
void | setTimeInSeconds (double timeInSeconds) |
Set the internal time by specifying seconds. | |
void | setTimeInMinutes (double timeInMinutes) |
Set the internal time by specifying minutes. | |
double | getTimeInMicroSeconds () const |
Get the internal time in microseconds. | |
double | getTimeInMilliSeconds () const |
Get the internal time in milliseconds. | |
double | getTimeInSeconds () const |
Get the internal time in seconds. | |
double | getTimeInMinutes () const |
Get the internal time in minutes. | |
void | setTime (double timeInSeconds) |
Set the internal time (by specifying seconds). | |
double | getTime () const |
Get the internal time (in seconds). | |
bool | isValid () const |
Check that the internal format of time is valid. | |
SimTime & | operator+= (const SimTime &rhs) |
An operator for the class. | |
SimTime & | operator-= (const SimTime &rhs) |
An operator for the class. | |
bool | operator< (const SimTime &rhs) const |
An operator for the class. | |
bool | operator<= (const SimTime &rhs) const |
An operator for the class. | |
bool | operator> (const SimTime &rhs) const |
An operator for the class. | |
bool | operator>= (const SimTime &rhs) const |
An operator for the class. |
Definition at line 13 of file sim_time.hpp.
SimTime::SimTime | ( | ) |
A constructor.
Time is set to zero by default.
Definition at line 4 of file sim_time.cpp.
References setTime().
SimTime::SimTime | ( | double | simTime | ) |
A constructor.
Sets time in seconds.
simTime | time (in seconds) to initialize object. |
Definition at line 9 of file sim_time.cpp.
References setTime().
double SimTime::getTime | ( | ) | const [inline] |
Get the internal time (in seconds).
Definition at line 166 of file sim_time.hpp.
References getTimeInSeconds().
double SimTime::getTimeInMicroSeconds | ( | ) | const [inline] |
Get the internal time in microseconds.
Note: does not handle overflow.
Definition at line 141 of file sim_time.hpp.
double SimTime::getTimeInMilliSeconds | ( | ) | const [inline] |
Get the internal time in milliseconds.
Note: does not handle overflow.
Definition at line 146 of file sim_time.hpp.
double SimTime::getTimeInMinutes | ( | ) | const [inline] |
Get the internal time in minutes.
Definition at line 156 of file sim_time.hpp.
double SimTime::getTimeInSeconds | ( | ) | const [inline] |
Get the internal time in seconds.
Definition at line 151 of file sim_time.hpp.
Referenced by Ricean::fadingFactor(), getTime(), and RfidReaderApp::simulationEndHandler().
bool SimTime::isValid | ( | ) | const [inline] |
Check that the internal format of time is valid.
Can be used in assert statements.
Definition at line 171 of file sim_time.hpp.
Referenced by Timer::timeRemaining().
void SimTime::setTime | ( | double | timeInSeconds | ) | [inline] |
Set the internal time (by specifying seconds).
timeInSeconds | new time specified in seconds. |
Definition at line 161 of file sim_time.hpp.
References setTimeInSeconds().
Referenced by Simulator::reset(), and SimTime().
void SimTime::setTimeInMicroSeconds | ( | double | timeInMicroSeconds | ) | [inline] |
Set the internal time by specifying microseconds.
timeInMicroSeconds | new time specified in microseconds. |
Definition at line 117 of file sim_time.hpp.
void SimTime::setTimeInMilliSeconds | ( | double | timeInMilliSeconds | ) | [inline] |
Set the internal time by specifying milliseconds.
timeInMilliSeconds | new time specified in milliseconds. |
Definition at line 123 of file sim_time.hpp.
void SimTime::setTimeInMinutes | ( | double | timeInMinutes | ) | [inline] |
Set the internal time by specifying minutes.
Note: does not handle overflow.
timeInMinutes | new time specified in minutes. |
Definition at line 135 of file sim_time.hpp.
void SimTime::setTimeInSeconds | ( | double | timeInSeconds | ) | [inline] |
Set the internal time by specifying seconds.
timeInSeconds | new time specified in seconds. |
Definition at line 129 of file sim_time.hpp.
Referenced by setTime().