#timer #periodic #periodically

bin+lib periodic_timer

simple Rust implementation of periodic timer

2 releases

0.1.1 Jul 30, 2022
0.1.0 Jul 30, 2022

#6 in #periodically

26 downloads per month

MIT/Apache

8KB
144 lines

Periodic Timer

periodic_timer is a simple Rust implementation of periodic timer.

Usage

use periodic_timer::Timer;

// Prepare callback function to be periodically executed
let callback = || println!("hello timer!");

// Create new timer
let timer = Timer::new(1.0, callback);

// Start timer
timer.start();

lib.rs:

Simple Timer

periodic_timer is a simple implementation of periodic timer.

Usage

use periodic_timer::Timer;

// Prepare callback function to be periodically executed
let callback = || println!("hello timer!");

// Create new timer
let timer = Timer::new(1.0, callback);

// Start timer
timer.start();

Dependencies

~0–9MB
~48K SLoC