Skip to content

inf0rmatix/reliable_interval_timer

Repository files navigation

A timer that produces ticks within a given interval, accurate to the millisecond.

Features

ReliableIntervalTimer class provides you a periodic timer that has the exact same duration between ticks, accurate to the millisecond. The timer is run inside an isolate.

Usage

ReliableIntervalTimer(
    interval: Duration(milliseconds: 100),
    callback: (elapsedMilliseconds) => print('elapsedMilliseconds: $elapsedMilliseconds');,
);

Additional information

After doing some testing, I figured out that this will run reliably on client devices, on server side I encountered issues with inaccurate timings.

About

A timer running a callback in a specified interval

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages