MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / Sub

Method Sub

pkg/util/duration/duration.go:808–810  ·  view source on GitHub ↗

Sub returns a Duration representing a time length of d-x.

(x Duration)

Source from the content-addressed store, hash-verified

806
807// Sub returns a Duration representing a time length of d-x.
808func (d Duration) Sub(x Duration) Duration {
809 return MakeDuration(d.nanos-x.nanos, d.Days-x.Days, d.Months-x.Months)
810}
811
812// Mul returns a Duration representing a time length of d*x.
813func (d Duration) Mul(x int64) Duration {

Callers 1

sqlStdToDurationFunction · 0.95

Calls 1

MakeDurationFunction · 0.85

Tested by

no test coverage detected