MCPcopy Create free account
hub / github.com/dolthub/doltgresql / MakeDuration

Function MakeDuration

postgres/parser/duration/duration.go:114–120  ·  view source on GitHub ↗

MakeDuration returns a Duration rounded to the nearest microsecond.

(nanos, days, months int64)

Source from the content-addressed store, hash-verified

112
113// MakeDuration returns a Duration rounded to the nearest microsecond.
114func MakeDuration(nanos, days, months int64) Duration {
115 return Duration{
116 Months: months,
117 Days: days,
118 nanos: rounded(nanos),
119 }
120}
121
122// MakeNormalizedDuration returns a normalized Duration.
123func MakeNormalizedDuration(nanos, days, months int64) Duration {

Callers 15

DifferenceFunction · 0.92
interval.goFile · 0.92
sqlStdToDurationFunction · 0.92
parseShortDurationMethod · 0.92
ZeroMethod · 0.92
interval.goFile · 0.92
truncateIntervalFunction · 0.92
minus.goFile · 0.92
NormalizeValFunction · 0.92
AddMethod · 0.85
SubMethod · 0.85

Calls 1

roundedFunction · 0.85

Tested by

no test coverage detected