AsyncTimer

Constructors

this
this(EventLoop evl)

Members

Functions

duration
typeof(this) duration(Duration dur)

Sets or changes the duration on the timer. For a running timer, this setting will take effect after the timer is expired (oneShot) or after it is killed (periodic).

kill
bool kill()

Cleans up underlying OS resources. This is required to change the timer from periodic to oneshot, or before disposing of this object.

periodic
typeof(this) periodic(bool b)

Sets the timer to become periodic. For a running timer, this setting will take effect after the timer is expired (oneShot) or after it is killed (periodic).

rearm
bool rearm(Duration dur)

Runs a non-periodic, oneshot timer once using the specified Duration as a timeout. The handler from the last call to run() will be reused.

run
bool run(void delegate() del)

Starts the timer using the delegate as an expiration callback.

Mixins

__anonymous
mixin DefStatus
Undocumented in source.
__anonymous
mixin EvInfoMixins
Undocumented in source.

Properties

id
fd_t id [@property getter]
id
fd_t id [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
oneShot
bool oneShot [@property getter]

Returns whether the timer is set to rearm itself (oneShot=false) or if it will have to be rearmed (oneShot=true).

rearmed
bool rearmed [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
rearmed
bool rearmed [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
timeout
Duration timeout [@property getter]

Returns the Duration that the timer will wait before calling the handler after it is run.

Mixed In Members

From mixin DefStatus

hasError
bool hasError [@property getter]

Check this property to make sure the event loop hasn't failed

status
StatusInfo status [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
error
string error [@property getter]

Returns a human-readable error message from the underlying operating system.

From mixin EvInfoMixins

CleanupData
struct CleanupData
Undocumented in source.
evInfo
EventInfo* evInfo [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
evInfo
EventInfo* evInfo [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta