add CHANGELOG, update LICENSE and README
A minimal naive timer for embedded platforms in Rust (no_std + alloc).
let mut timer = naive_timer::Timer::default(); let event = Arc::new(AtomicBool::new(false)); // add a timer with callback timer.add(Duration::from_secs(1), { let event = event.clone(); move |_now| event.store(true, Ordering::SeqCst) }); // expire timers (usually from timer interrupt) timer.expire(Duration::from_millis(1000)); assert_eq!(event.load(Ordering::SeqCst), true); assert_eq!(timer.next(), None);
The code in this repository is licensed under the MIT License.
A minimal naive timer for embedded platforms (no_std) in Rust.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
naive-timer
A minimal naive timer for embedded platforms in Rust (no_std + alloc).
Example
License
The code in this repository is licensed under the MIT License.