#include "gtimer.h"

class GTimer

This class implements a simple interval timer that generates a GTimerEvent with a specified frequency. Copying a GTimer object is legal and creates an object that refers to the same internal timer.
Constructor
GTimer(milliseconds) Creates a timer object that generates a GTimerEvent each time the specified number of milliseconds has elapsed.
Methods
start() Starts the timer.
stop() Stops the timer so that it stops generating events until it is restarted.

Constructor detail


GTimer(double milliseconds);
Creates a timer object that generates a GTimerEvent each time the specified number of milliseconds has elapsed. No events are generated until the client calls start on the timer. For more details on using timers, see the documentation for the GTimerEvent class.

Usage:

GTimer timer(milliseconds);

Method detail


void start();
Starts the timer. A timer continues to generate timer events until it is stopped; to achieve the effect of a one-shot timer, the simplest approach is to call the stop method inside the event handler.

Usage:

timer.start();

void stop();
Stops the timer so that it stops generating events until it is restarted.

Usage:

timer.stop();