tag: Improve tag property::index support (FS#1229)
[awesome.git] / luadoc / timer.lua
blob51edcc2995a70b64730fd9883c0d9d816742cd0c
1 --- awesome timer API
2 -- @author Julien Danjou <julien@danjou.info>
3 -- @copyright 2009 Julien Danjou
4 module("timer")
6 --- Timer object. This type of object is useful when triggering events in a repeatedly.
7 -- The timer will emit the "timeout" signal every N seconds, N being the timeout value.
8 -- @field timeout Interval in seconds to emit the timeout signal.
9 -- Can be any value, including floating ones (i.e. 1.5 second).
10 -- @field started Read-only boolean field indicating if the timer has been started.
11 -- @class table
12 -- @name timer
14 --- Start the timer.
15 -- @name start
16 -- @class function
18 --- Stop the timer.
19 -- @name stop
20 -- @class function
22 --- Restart the timer.
23 -- @name again
24 -- @class function
26 --- Add a signal.
27 -- @param name A signal name.
28 -- @param func A function to call when the signal is emitted.
29 -- @name connect_signal
30 -- @class function
32 --- Remove a signal.
33 -- @param name A signal name.
34 -- @param func A function to remove.
35 -- @name disconnect_signal
36 -- @class function
38 --- Emit a signal.
39 -- @param name A signal name.
40 -- @param ... Various arguments, optional.
41 -- @name emit_signal
42 -- @class function
44 --- Get the number of instances.
45 -- @return The number of timer objects alive.
46 -- @name instances
47 -- @class function