-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core/time): Add comprehensive tests and documentation for Clock … #12860
base: master
Are you sure you want to change the base?
Conversation
…implementation - Add usage examples and detailed API documentation - Implement test suite for real and fake clock functionality - Document cancellation behavior and time characteristics - Remove TODO comment by implementing missing tests
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
@akhi3030 Corrected everything |
@akhi3030 resolved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the back and forth. It is not easy to get the subtleties in code right. I hope this will be one of the final rounds of reviews.
core/time/src/clock.rs
Outdated
if inner.now() >= deadline { | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check seems unnecessary as in it will be quite rarely hit. deadline
is now + d
. And we know that d
is not 0 so chances of this condition being true should be only when the process gets interrupted in between computing deadline and this line which should be quite rare. So I would say we can remove it.
…implementation