Gnash
0.8.10
|
A VirtualClock wrapper adding pause/resume capabilities. More...
#include <VirtualClock.h>
Public Member Functions | |
InterruptableVirtualClock (VirtualClock &src) | |
Construct an InterruptableVirtualClock from a VirtualClock source. | |
unsigned long int | elapsed () const |
Return elapsed time, taking interruptions in consideration. | |
void | restart () |
Restart the clock. | |
void | pause () |
void | resume () |
A VirtualClock wrapper adding pause/resume capabilities.
gnash::InterruptableVirtualClock::InterruptableVirtualClock | ( | VirtualClock & | src | ) | [inline] |
Construct an InterruptableVirtualClock from a VirtualClock source.
The interruptable virtual clock starts in 'stop' mode, use resume() to start.
src | A VirtualClock to use as source, ownership is retained by caller which should guarantee to keep the source alive for the whole lifetime of this instance. |
unsigned long int gnash::InterruptableVirtualClock::elapsed | ( | ) | const [inline, virtual] |
Return elapsed time, taking interruptions in consideration.
Implements gnash::VirtualClock.
References gnash::VirtualClock::elapsed().
void gnash::InterruptableVirtualClock::pause | ( | ) | [inline] |
Referenced by gnash::Gui::stop(), and gnash::Gui::pause().
void gnash::InterruptableVirtualClock::restart | ( | ) | [inline, virtual] |
void gnash::InterruptableVirtualClock::resume | ( | ) | [inline] |
References gnash::VirtualClock::elapsed(), and assert.
Referenced by gnash::Gui::play(), and gnash::Gui::start().