luadoc: add timer documentation

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-08-28 12:05:38 +02:00
parent ce5c171b36
commit ac7ede50a2
1 changed files with 40 additions and 0 deletions

40
luadoc/timer.lua Normal file
View File

@ -0,0 +1,40 @@
--- awesome timer API
-- @author Julien Danjou &lt;julien@danjou.info&gt;
-- @copyright 2009 Julien Danjou
module("timer")
--- Timer object. This type of objects is useful to trigger events in a repeated manner.
-- The timer will emit the "timeout" signal every N seconds, N being the timeout value.
-- @field timeout Interval in seconds to emit the timeout signal.
-- Can be any value, including floating ones (i.e. 1.5 second).
-- @field started Read-only boolean field indicating if the timer has been started.
-- @class table
-- @name timer
--- Start the timer.
-- @param -
-- @name start
-- @class function
--- Stop the timer.
-- @param -
-- @name stop
-- @class function
--- Add a signal.
-- @param name A signal name.
-- @param func A function to call when the signal is emited.
-- @name add_signal
-- @class function
--- Remove a signal.
-- @param name A signal name.
-- @param func A function to remove.
-- @name remove_signal
-- @class function
--- Emit a signal.
-- @param name A signal name.
-- @param ... Various arguments, optional.
-- @name emit_signal
-- @class function