2 releases
0.1.1 | Jul 30, 2022 |
---|---|
0.1.0 | Jul 30, 2022 |
#12 in #executed
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–6.5MB
~37K SLoC