Re: Vibe.d timer - change callback?

2020-08-27 Thread James Blachly via Digitalmars-d-learn
On Tuesday, 25 August 2020 at 18:42:53 UTC, codic wrote: I'd like to be able to change the callback of a vibe.d Timer (eg created with http://vibe-core.dpldocs.info/v1.9.3/vibe.core.core.createTimer.html) after creation, something like: auto timer = createTimer(); timer.rearm(duration, /*...*/

Re: Vibe.d timer - change callback?

2020-08-27 Thread FreeSlave via Digitalmars-d-learn
On Tuesday, 25 August 2020 at 18:42:53 UTC, codic wrote: I'd like to be able to change the callback of a vibe.d Timer (eg created with http://vibe-core.dpldocs.info/v1.9.3/vibe.core.core.createTimer.html) after creation, something like: auto timer = createTimer(); timer.rearm(duration, /*...*/

Vibe.d timer - change callback?

2020-08-25 Thread codic via Digitalmars-d-learn
I'd like to be able to change the callback of a vibe.d Timer (eg created with http://vibe-core.dpldocs.info/v1.9.3/vibe.core.core.createTimer.html) after creation, something like: auto timer = createTimer(); timer.rearm(duration, /*...*/); timer.callback = delegate { // things } An alternat