We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 347cf4a commit 3337d28Copy full SHA for 3337d28
ptypes/duration.go
@@ -82,7 +82,7 @@ func Duration(p *durpb.Duration) (time.Duration, error) {
82
return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p)
83
}
84
if p.Nanos != 0 {
85
- d += time.Duration(p.Nanos)
+ d += time.Duration(p.Nanos) * time.Nanosecond
86
if (d < 0) != (p.Nanos < 0) {
87
88
0 commit comments