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.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello guys!
I created a test task with constant iteration delay and tried to manage stopped time with
tokio::time::advance.For 100ms delay I got 200ms in output. A bit unexpectedly, but ok.
And I tried to fix it with the context switch before
tokio::time::advance(100ms)withyield_nowalternative and got nice100ms results.
But after that I set 7ms delay and got something unexpected: 98ms delay for
MissedTickBehavior::Delay:Test output:
I thought, that
MissedTickBehavior::Delayalways has equal or bigger ticks than the period...Maybe someone has any ideas about such strange behaviour?
Beta Was this translation helpful? Give feedback.
All reactions