#include <PhxClock.h>
Inheritance diagram for Phx::Clock:

Public Member Functions | |
| virtual Ptr< Task > | newTask (const String &name)=0 |
| Creates a new Task subinterface that allows the client to install a listener to be invoked at a scheduled time. | |
| virtual Ptr< Timer > | newTimer (void)=0 |
| Creates a new Timer whose sense of time is governed by this Clock. | |
| virtual double | time (void) const =0 |
| Read the current time. | |
| virtual void | time (double time)=0 |
Sets the current reported time to time. | |
| virtual double | rate (void) const =0 |
| Gets the current rate of this Clock. | |
| virtual void | rate (double rate)=0 |
| Sets the current rate of this Clock. | |
Classes | |
| class | Task |
| A Task is an interface to a Clock that allows you to schedule a callback based on the Clock. More... | |
| class | Timer |
| The Timer is a sub-interface to a clock that keeps track of elapsed time relative to the clock. More... | |
In addition to reporting its current recorded time, it also allows clients to obtain their own clock based on it, and also schedule Tasks for execution at a particular time.
Every Clock has a "reference time", relative to which it measures its "reported time" (the time shown via the time() attribute to the client). As a client, you may increase the rate at which the reported time advances, and you may explicitly change the current reported time. Most Clock types will define what their reference time is, and this will generally determine the rest of the Clock's behavior.
|
|
Creates a new Task subinterface that allows the client to install a listener to be invoked at a scheduled time.
|
|
|
Creates a new Timer whose sense of time is governed by this Clock. The Timer's initial time is 0 and changes (initially) at the same rate as this Clock. As this Clock changes (either by the client changing it or by its internal clock advancing), the Timer will change by a corresponding amount, adjusted for the rate of the timer.
|
|
|
Sets the current rate of this Clock.
|
|
|
Gets the current rate of this Clock.
|
|
|
Sets the current reported time to
|
|
|
Read the current time.
|
1.4.2