Open
Description
Tquic currently calls Instant::now()
in various places, e.g. connection.rs
or endpoint.rs
.
Moving time management from tquic to the applications would make the state machine more deterministic, which would improve testability and performance.
Also, the time granularity could be controlled by the application.
Automated tests that require timed events would be simpler.
In my sender performance profiling, currently about 2% of the recorded samples are now()
calls, this could be reduced.
For example the signature of send(&mut self, out: &mut [u8])
could be changed to send(&mut self, out: &mut [u8], now: Instant)
.
Related issue: cloudflare/quiche#1828