Skip to content
Permalink
Browse files

Improved docstring of Timer

  • Loading branch information...
prologic committed Jun 12, 2014
1 parent cc33343 commit 1f1397e79e36a6da8b1016bf5a911fe873a6213b
Showing with 13 additions and 11 deletions.
  1. +13 −11 circuits/core/timers.py
@@ -22,17 +22,19 @@ class Timer(BaseComponent):
def __init__(self, interval, event, *channels, **kwargs):
"""
:param interval: the delay or interval to wait for until
the event is fired. If interval is specified as
datetime, the interval is recalculated as the time span from
now to the given datetime.
:type interval: datetime or float number
:param event: the event to fire.
:type event: :class:`~.events.Event`
If the optional keyword argument *persist* is set to ``True``,
the event will be fired repeatedly. Else the timer fires the
event once and then unregisters itself.
the event is fired. If interval is specified as
datetime, the interval is recalculated as the
time span from now to the given datetime.
:type interval: ``datetime`` or number of seconds as a ``float``
:param event: the event to fire.
:type event: :class:`~.events.Event`
:param persist: An optional keyword argument which if ``True``
will cause the event to be fired repeatedly
once per configured interval until the timer
is unregistered. **Default:** ``False``
:type persist: ``bool``
"""

super(Timer, self).__init__()

0 comments on commit 1f1397e

Please sign in to comment.
You can’t perform that action at this time.