Expose tick interval constant and simplify handler

Move the 33 ms tick interval into `tick` as a public constant `TICK_MS`
and drop the parameter from `handle_tick_event`.
Update re‑exports and callers accordingly
This commit is contained in:
GarandPLG committed 2026-05-05 13:58:17 +02:00
1 parent b1183175be
commit 35209dd064
3 files changed
+6 -6

No files matched your search

+4 -2
View File
@@ -4,8 +4,10 @@ use std::{
time::{Duration, Instant},
};
pub fn handle_tick_event(tx: Sender<()>, tick_ms: u8) {
let interval: Duration = Duration::from_millis(tick_ms as u64);
pub const TICK_MS: u8 = 33;
pub fn handle_tick_event(tx: Sender<()>) {
let interval: Duration = Duration::from_millis(TICK_MS as u64);
loop {
if tx.send(()).is_err() {
break;