async fn run_task2(delay_dur: Duration, total_dur: Duration, beat: Beat) {
    let count = total_dur.as_millis() / delay_dur.as_millis();
    for _ in 1..=count {
        let _ = beat.now();
        smol::Timer::after(delay_dur).await; 
    }
}
// Mock test task without seperate counter, which is more like a real scenario 
Mock test task without seperate counter, which is more like a real scenario
Mock test task without seperate counter which is more like a real scenario
async fn run_task2(delay_dur: Duration, total_dur: Duration, beat: Beat) {
    let count = total_dur.as_millis() / delay_dur.as_millis();
    for _ in 1..=count {
        let _ = beat.now();
        smol::Timer::after(delay_dur).await; 
    }
}
async fn run_task2 ( delay_dur : Duration , total_dur : Duration , beat : Beat ) { let count = total_dur . as_millis ( ) / delay_dur . as_millis ( ) ; for _ in 1 ..= count { let _ = beat . now ( ) ; smol :: Timer :: after ( delay_dur ) . await ; } }
Mock test task without seperate counter, which is more like a real scenario
Mock test task without seperate counter which is more like a real scenario
delay_dur
Duration
total_dur
Duration
beat
Beat
delay_dur
Duration
total_dur
Duration
beat
Beat