campy.graphics.gtimer module

A general interval timer that fires :class:GTimerEvent`s.

class campy.graphics.gtimer.GTimer(milliseconds)[source]

Bases: object

An interval timer that generates :class:GTimerEvent`s at a fixed rate.

pause(milliseconds)[source]

Pause this timer for some time before automatically resuming.

Parameters:milliseconds – How long to pause this timer for (in milliseconds).
start()[source]

Start this timer.

A timer will generate :class:`GTimerEvent`s until it is stopped.

To achieve the effect of a one-shot timer, the best approach is to call stop() on this timer after processing one event.

stop()[source]

Stop this timer from generating events until it is restarted.