MakeDuration returns a Duration rounded to the nearest microsecond.
(nanos, days, months int64)
| 96 | |
| 97 | // MakeDuration returns a Duration rounded to the nearest microsecond. |
| 98 | func MakeDuration(nanos, days, months int64) Duration { |
| 99 | return Duration{ |
| 100 | Months: months, |
| 101 | Days: days, |
| 102 | nanos: rounded(nanos), |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | // MakeDurationJustifyHours returns a duration where hours are moved |
| 107 | // to days if the number of hours exceeds 24. |
no test coverage detected
searching dependent graphs…