Skip to content

Conversation

@erikjohnston
Copy link
Member

@erikjohnston erikjohnston commented Nov 26, 2025

This changes the arguments in clock functions to be Duration and converts call sites and constants into Duration. There are still some more functions around that should be converted (e.g. timeout_deferred), but we leave that to another PR.

We also changes .as_secs() to return a float, as the rounding broke things subtly. The only reason to keep it (its the same as timedelta.total_seconds()) is for symmetry with as_millis().

Follows on from #19223

Reviewable commit-by-commit.

@erikjohnston erikjohnston marked this pull request as ready for review November 28, 2025 10:31
@erikjohnston erikjohnston requested a review from a team as a code owner November 28, 2025 10:31
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice readability improvements across the board!

I went through each of the conversions and they looked to be correct. Just a few things below.

Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks again for doing this!

@erikjohnston erikjohnston merged commit 1bddd25 into develop Dec 1, 2025
45 checks passed
@erikjohnston erikjohnston deleted the erikj/duration branch December 1, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants