Closed Kripth closed 6 years ago
It seems that the KissTimer in package kiss.util.timer always runs every 1 second, regardless of the Duration passed to the constructor.
KissTimer
kiss.util.timer
Duration
I have tested on Windows 10 with the following program:
import std.datetime : StopWatch, seconds; import std.stdio : writeln; import kiss.event : EventLoop; import kiss.util.timer : KissTimer; EventLoop eventLoop = new EventLoop(); StopWatch watch = StopWatch(); watch.start(); KissTimer timer = new KissTimer(eventLoop, 10.seconds); timer.onTick((Object sender){ writeln(watch.peek.msecs); }); timer.start(); eventLoop.run();
waiting for @Heromyth to review and testing this question.
Thanks! It fixed in https://github.com/huntlabs/kiss/commit/bcfaba9ae485dd5bc1487103b54fa60119d3239e.
It seems that the
KissTimer
in packagekiss.util.timer
always runs every 1 second, regardless of theDuration
passed to the constructor.I have tested on Windows 10 with the following program: