Mercurial > molko
comparison doc/api-molko-clock.rst @ 191:633a25df450e
molko-js: miscellaneous fixes
While here, import sphinx as experimental documentation.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 07 Nov 2020 15:40:34 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
190:5dc57029b9f1 | 191:633a25df450e |
---|---|
1 .. toctree:: | |
2 .. _api-molko-clock: | |
3 | |
4 Molko.Clock | |
5 =========== | |
6 | |
7 Keep track of elapsed time. | |
8 | |
9 Constructors | |
10 ------------ | |
11 | |
12 .. js:function:: Molko.Clock() | |
13 | |
14 Create a new clock object and start collecting time from now. This function | |
15 MUST be called as a constructor, not doing so will also raise an error. | |
16 | |
17 Methods | |
18 ------- | |
19 | |
20 .. js:method:: Molko.Clock.start() | |
21 | |
22 Reset the clock from now. | |
23 | |
24 Properties | |
25 ---------- | |
26 | |
27 The following properties are available once an object has been constructed: | |
28 | |
29 .. js:attribute:: Molko.Clock.elapsed | |
30 | |
31 (Read-only) Number of milliseconds elapsed since construction of object or last | |
32 call to start function. |