Skip to content

crtime: add (Mono).Add - #26

Merged
stevendanna merged 1 commit into
mainfrom
ssd/add
Oct 24, 2025
Merged

crtime: add (Mono).Add#26
stevendanna merged 1 commit into
mainfrom
ssd/add

Conversation

@stevendanna

@stevendanna stevendanna commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

This may make it a bit easier to adopt Mono in libraries without forcing us to immediately update all callers.


This change is Reviewable

@stevendanna

Copy link
Copy Markdown
Contributor Author

Happy to drop the interface definition from the PR if that is preferred.

@RaduBerinde RaduBerinde left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, honestly it's a bit strange to have an interface defined that is not used anywhere.

:lgtm: otherwise

@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

@stevendanna stevendanna changed the title crtime: add (Mono).add and ClockReading. crtime: add (Mono).Add Oct 24, 2025
@stevendanna
stevendanna merged commit a2e0a21 into main Oct 24, 2025
8 of 9 checks passed
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.

2 participants