Skip to content

Commit 9fd6cf9

Browse files
committed
Docs: Timers
1 parent 06da732 commit 9fd6cf9

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

docs/source/performance.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This is ignoring delays or blocks caused by OpenGL calls.
99

1010
.. Note::
1111

12-
How important performance is will of course depends on the project.
12+
How important performance is will of course depend on the project.
1313
Visualization for a scientific application doing some heavy
1414
calculations would probably not need to run at 60 fps.
1515
It's also not illegal to not care about performance and just have fun.

docs/source/timers.rst

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,33 @@
22
Timers
33
======
44

5-
Write stuff
5+
Timers are classes keeping track of time passing these time values
6+
to the effect's ``draw`` methods. We should assume that time can move
7+
in any direction at any speed. Time is always reported as a float in
8+
seconds.
9+
10+
The default timer if not specified in settings:
11+
12+
.. code-block:: shell
13+
14+
TIMER = 'demosys.timers.Timer'
15+
16+
This is a simple timer starting at 0 when effects start drawing.
17+
All timers should respond correctly to pause ``SPACE``.
18+
19+
20+
Standard Timers
21+
^^^^^^^^^^^^^^^
22+
23+
- ``demosys.timers.Timer``: Default timer just tracking time in seconds
24+
- ``demosys.timers.Music``: Timer playing music reporting duration in the song
25+
- ``demosys.timers.RocketTimer``: Timer using the rocket sync system
26+
- ``demosys.timers.RocketMusicTimer``: Timer using the rocket sync system with music playback
27+
28+
Custom Timer
29+
^^^^^^^^^^^^
30+
31+
You create a custom timer by extending ``demosys.timers.base.BaseTimer``.
32+
33+
.. autoclass:: demosys.timers.base.BaseTimer
34+
:members:

0 commit comments

Comments
 (0)