RejectedSoftware Forums

Sign up

How to use Vibe.d timers

Please add simple example how to use Vibe.d timers.

Re: How to use Vibe.d timers

On 2013-12-12 4:50 AM, ilya-stromberg wrote:

Please add simple example how to use Vibe.d timers.

You can just call sleep(int) and the core will create a timer in the
event loop that resumes the current fiber once it expires.

Re: How to use Vibe.d timers

On 2013-12-12 4:50 AM, ilya-stromberg wrote:

Please add simple example how to use Vibe.d timers.

For setTimer(int, void delegate(), bool periodic) see:

https://github.com/rejectedsoftware/vibed.org/blob/master/source/app.d
line 129

https://github.com/rejectedsoftware/vibe.d/blob/master/examples/rest/source/app.d
line 350