crtime: add (Mono).Add - #26
Merged
Merged
Conversation
Contributor
Author
|
Happy to drop the interface definition from the PR if that is preferred. |
RaduBerinde
approved these changes
Oct 16, 2025
RaduBerinde
left a comment
Member
There was a problem hiding this comment.
Yeah, honestly it's a bit strange to have an interface defined that is not used anywhere.
@RaduBerinde reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @stevendanna)
crtime/monotonic.go line 50 at r1 (raw file):
} // Add returns the time.Mono m+d.
time. is not right, mayne just say "the moment m+d"
crtime/monotonic.go line 52 at r1 (raw file):
// Add returns the time.Mono m+d. func (m Mono) Add(d time.Duration) Mono { return Mono(time.Duration(m) + d)
OCD nit but m + Mono(d) is more intuitive to me
RaduBerinde
approved these changes
Oct 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This may make it a bit easier to adopt Mono in libraries without forcing us to immediately update all callers.
This change is