MCPcopy Create free account
hub / github.com/prometheus/common / Add

Method Add

model/time.go:85–87  ·  view source on GitHub ↗

Add returns the Time t + d.

(d time.Duration)

Source from the content-addressed store, hash-verified

83
84// Add returns the Time t + d.
85func (t Time) Add(d time.Duration) Time {
86 return t + Time(d/minimumTick)
87}
88
89// Sub returns the Duration t - o.
90func (t Time) Sub(o Time) time.Duration {

Callers 15

TestSilenceValidateFunction · 0.80
TestDurationFunction · 0.80
TestAlertValidateFunction · 0.80
TestAlertFunction · 0.80
TestSortAlertsFunction · 0.80
TestAlertsStatusFunction · 0.80
RoundTripMethod · 0.80
TokenMethod · 0.80
SerialNumberFunction · 0.80
GenerateCertificateFunction · 0.80

Calls 1

TimeTypeAlias · 0.85

Tested by 15

TestSilenceValidateFunction · 0.64
TestDurationFunction · 0.64
TestAlertValidateFunction · 0.64
TestAlertFunction · 0.64
TestSortAlertsFunction · 0.64
TestAlertsStatusFunction · 0.64
TestNewClientFromConfigFunction · 0.64
newTestOAuthServerFunction · 0.64
TestOAuth2UserAgentFunction · 0.64