-
Hello guys! I created a test task with constant iteration delay and tried to manage stopped time with
Test output:
I thought, that Maybe someone has any ideas about such strange behaviour? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It seems, that there could be my problem: https://docs.rs/tokio/latest/src/tokio/time/interval.rs.html#478 |
Beta Was this translation helpful? Give feedback.
It seems, that there could be my problem: https://docs.rs/tokio/latest/src/tokio/time/interval.rs.html#478
We have such check for missed tick:
let next = if now > timeout + Duration::from_millis(5)
And in my case the first delay is 105ms = period + 5ms. 105 unfortunately is in allowed range, and I don't get the missed tick condition. The next delay is 98ms, but for Interval it is 98 + 5ms