TimerEvent

TimerEvent class, calls the provided delegate when the timer fires and is handled in epoll.

Usage example: See documented unittest after class

Constructors

this
this(Handler handler, bool realtime)

Constructor. Creates a file descriptor to manage the event.

Members

Aliases

Handler
alias Handler = bool delegate()

Alias for event handler delegate.

Functions

handle_
bool handle_(ulong n)

Called from the select dispatcher when the event fires. Calls the user- provided event handler.

setHandler
void setHandler(Handler handler)

Set a new handler

Inherited Members

From ITimerEvent

TimerException
alias TimerException = TimerFD.TimerException

Convenience and compatibility alias.

events
Event events()
absolute
bool absolute()
absolute
void absolute(bool abs)

Sets the timer to absolute or relative mode.

handle_
bool handle_(ulong n)

Timer expiration event handler.

time
itimerspec time()

Returns the next expiration time.

set
itimerspec set(timespec first, timespec interval)

Sets next expiration time of interval timer.

set
itimerspec set(time_t first_s, uint first_ms, time_t interval_s, uint interval_ms)

Sets next expiration time of interval timer.

reset
itimerspec reset()

Resets/disarms the timer.

fileHandle
Handle fileHandle()

Required by ISelectable interface.

handle
bool handle(Event event)

Event handler, invoked by the epoll select dispatcher.

id
cstring id()

Returns an identifier string for this instance

Meta