Determines the minimum amount of time that elapses before the timer fires.
This delegate will be called when the timer fires
Speficies if the timer fires repeatedly or only once
Returns a Timer object that can be used to identify and modify the timer.
void printTime() @safe { import std.datetime; logInfo("The time is: %s", Clock.currTime()); } void test() { import vibe.core.core; // start a periodic timer that prints the time every second setTimer(1.seconds, &printTime, true); }
createTimer
Returns a new armed timer.
Note that timers can only work if an event loop is running.
Passing a @system callback is scheduled for deprecation. Use a @safe callback instead.