We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2a49e18 + b16677c commit a2e0a21Copy full SHA for a2e0a21
crtime/monotonic.go
@@ -39,6 +39,11 @@ func (m Mono) Sub(other Mono) time.Duration {
39
return time.Duration(m - other)
40
}
41
42
+// Add returns the moment m+d.
43
+func (m Mono) Add(d time.Duration) Mono {
44
+ return m + Mono(d)
45
+}
46
+
47
// Elapsed returns the duration that elapsed since m.
48
func (m Mono) Elapsed() time.Duration {
49
return time.Duration(NowMono() - m)
0 commit comments