Skip to content

Remove direct Instant::now() calls #433

Open
@birneee

Description

@birneee

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions