Used to set and maintain time in a simulation.
More...
Static Public Attributes |
| static const double | hour2sec |
| | Clock constants used for time conversions.
|
| static const double | sec2hour |
Detailed Description
Used to set and maintain time in a simulation.
- Examples
-
Constructor & Destructor Documentation
| DtClock::DtClock |
( |
const DtClock & |
orig | ) |
|
| virtual DtClock::~DtClock |
( |
| ) |
|
|
virtual |
Member Function Documentation
| virtual DtTime DtClock::absRealTime |
( |
| ) |
const |
|
virtual |
Return current wall-clock time - seconds since Jan 1, 1970.
| virtual DtTime DtClock::approximateElapsedRealTime |
( |
| ) |
const |
|
virtual |
Returns the value of getElapsedRealTime at the time that setSimTime was last invoked.
| virtual void DtClock::clearUseSimTimeForApproxRealTime |
( |
| ) |
|
|
virtual |
| virtual DtTime DtClock::elapsedRealTime |
( |
| ) |
const |
|
virtual |
Return real seconds elapsed since DtTimeInit was called.
| virtual void DtClock::init |
( |
| ) |
|
|
virtual |
Initialize all VR-Link time object functionality.
This must be called before any other time-related functions.
| virtual bool DtClock::isSimTimeSet |
( |
| ) |
const |
|
virtual |
Returns false if DtSetSimTime was never called and prints out warning message.
| virtual void DtClock::setSimTime |
( |
DtTime |
NewSimTime | ) |
|
|
virtual |
Set the current value of VR-Link simulation time.
Should be called once per simulation frame to let VR-Link know the value of simulation time for the frame.
| virtual void DtClock::setUseSimTimeForApproxRealTime |
( |
| ) |
|
|
virtual |
| virtual DtTime DtClock::simTime |
( |
| ) |
const |
|
virtual |
Get the current value of VR-Link's simulation time.
| virtual bool DtClock::useSimTimeForApproxRealTime |
( |
| ) |
const |
|
virtual |
Check whether myUseSimTimeForApproxRealTime is set.
Member Data Documentation
| const double DtClock::hour2sec |
|
static |
Clock constants used for time conversions.
| DtTime DtClock::myApproxElapsedRealTime |
|
protected |
This is the Elapsed Real Time at the point that SetSimTime() is called.
It is good enough for timeouts, and is a LOT cheaper than getting the exact real time, which is overkill.
Save starting time to subtract from current to get elapsed.
This is the internal vr-link simulation clock.
| bool DtClock::mySimTimeSet |
|
protected |
| bool DtClock::myUseSimTimeForApproxRealTime |
|
protected |
Flag to change meaning of approximate real time.
| const double DtClock::sec2hour |
|
static |
The documentation for this class was generated from the following file: