refactor: wip

This commit is contained in:
GyDi
2022-04-19 01:41:20 +08:00
parent 01dfe83fcd
commit 401e6b5a57
15 changed files with 1799 additions and 804 deletions

View File

@@ -0,0 +1,20 @@
use delay_timer::prelude::{DelayTimer, DelayTimerBuilder, Task, TaskBuilder};
use std::collections::HashMap;
pub struct Timer {
delay_timer: DelayTimer,
timer_map: HashMap<String, u64>,
timer_count: u64,
}
impl Timer {
pub fn new() -> Self {
Timer {
delay_timer: DelayTimerBuilder::default().build(),
timer_map: HashMap::new(),
timer_count: 1,
}
}
}