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

Method Sub

pkg/util/duration/duration.go:471–473  ·  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

469
470// Sub returns a Duration representing a time length of d-x.
471func (d Duration) Sub(x Duration) Duration {
472 return MakeDuration(d.nanos-x.nanos, d.Days-x.Days, d.Months-x.Months)
473}
474
475// Mul returns a Duration representing a time length of d*x.
476func (d Duration) Mul(x int64) Duration {

Callers 2

sqlStdToDurationFunction · 0.95
DiffMicrosFunction · 0.45

Calls 1

MakeDurationFunction · 0.85

Tested by

no test coverage detected