| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/clock.h>

Public Member Functions | |
| Clock (bool isARealTimeClock=true, double delayInSec=0.001) | |
| virtual void | start () |
| Start the clock in order to produce tick events. | |
| virtual void | stop () |
| Stop the clock and do not produce any tick events anymore. | |
| void | tick (const VRSTime &now) |
| Sends time events to all associated managers. | |
| void | setDelay (double delayInSec) |
| double | getDelay () const |
| void | addManager (Manager *mgr) |
| void | removeManager (Manager *mgr) |
| bool | hasManager (Manager *mgr) const |
| void | copyManagers (Clock *anotherClock) const |
| virtual VRSTime | time () |
| bool | isRealTime () const |
| VRS_TYPEINFO (Clock, SharedObj) | |
Static Public Member Functions | |
| static Clock * | systemClock () |
Classes | |
| struct | TimeSlave |
| VRS::Clock::Clock | ( | bool | isARealTimeClock = true, |
|
| double | delayInSec = 0.001 | |||
| ) |
This class keeps track of the time and notifies associated managers about the time progress. A manager is an object that needs to be informed about time progress, i.e., it handles time events.
| virtual void VRS::Clock::start | ( | ) | [inline, virtual] |
| virtual void VRS::Clock::stop | ( | void | ) | [inline, virtual] |
| void VRS::Clock::tick | ( | const VRSTime & | now | ) |
Sends time events to all associated managers.
| void VRS::Clock::setDelay | ( | double | delayInSec | ) |
| double VRS::Clock::getDelay | ( | ) | const |
| void VRS::Clock::addManager | ( | Manager * | mgr | ) |
| void VRS::Clock::removeManager | ( | Manager * | mgr | ) |
| bool VRS::Clock::hasManager | ( | Manager * | mgr | ) | const |
| void VRS::Clock::copyManagers | ( | Clock * | anotherClock | ) | const |
The clock delivers as many and as accurate time-events to the managers.
| virtual VRSTime VRS::Clock::time | ( | ) | [virtual] |
Reimplemented in VRS::FPSClock.
| bool VRS::Clock::isRealTime | ( | ) | const |
`time' returns the current time. `isRealTime' tells whether we have a real time clock (which then uses `VRSTimenow' to obtain the time) or not.
| static Clock* VRS::Clock::systemClock | ( | ) | [static] |