diff --git a/source/eventcore/driver.d b/source/eventcore/driver.d index 18cd929..41f7a93 100644 --- a/source/eventcore/driver.d +++ b/source/eventcore/driver.d @@ -80,7 +80,7 @@ interface EventDriver { // // Timers // - TimerID createTimer(TimerCallback callback); + TimerID createTimer(); void setTimer(TimerID timer, Duration timeout, Duration repeat = Duration.zero); void stopTimer(TimerID timer); bool isTimerPending(TimerID timer); diff --git a/source/eventcore/drivers/timer.d b/source/eventcore/drivers/timer.d index f900a83..9c4239d 100644 --- a/source/eventcore/drivers/timer.d +++ b/source/eventcore/drivers/timer.d @@ -66,7 +66,7 @@ mixin template DefaultTimerImpl() { m_firedTimers.assumeSafeAppend(); } - final override TimerID createTimer(TimerCallback callback) + final override TimerID createTimer() @trusted { auto id = cast(TimerID)(m_lastTimerID + 1); TimerSlot* tm; @@ -75,7 +75,6 @@ mixin template DefaultTimerImpl() { assert(tm !is null); tm.id = id; tm.refCount = 1; - tm.callbacks ~= callback; m_timers[id] = tm; return id; }