Mercurial > molko
view 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 |
line wrap: on
line source
.. toctree:: .. _api-molko-clock: Molko.Clock =========== Keep track of elapsed time. Constructors ------------ .. js:function:: Molko.Clock() Create a new clock object and start collecting time from now. This function MUST be called as a constructor, not doing so will also raise an error. Methods ------- .. js:method:: Molko.Clock.start() Reset the clock from now. Properties ---------- The following properties are available once an object has been constructed: .. js:attribute:: Molko.Clock.elapsed (Read-only) Number of milliseconds elapsed since construction of object or last call to start function.