This commit is contained in:
2025-08-23 17:57:39 -04:00
parent fe85abff04
commit 9ca9c53baf
6 changed files with 59 additions and 9 deletions

View File

@ -45,3 +45,13 @@ func (d Duration) MarshalJSON() ([]byte, error) {
func (d Duration) String() string {
return d.Duration.String()
}
// Int64 returns the duration in nanoseconds for validator compatibility
func (d Duration) Int64() int64 {
return int64(d.Duration)
}
// IsZero returns true if the duration is zero
func (d Duration) IsZero() bool {
return d.Duration == 0
}