Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions crtime/monotonic.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ func (m Mono) Sub(other Mono) time.Duration {
return time.Duration(m - other)
}

// Add returns the moment m+d.
func (m Mono) Add(d time.Duration) Mono {
return m + Mono(d)
}

// Elapsed returns the duration that elapsed since m.
func (m Mono) Elapsed() time.Duration {
return time.Duration(NowMono() - m)
Expand Down
Loading