Skip to content

Commit 707607c

Browse files
authored
coordinates.html.markdown: simplify duration calc (#628)
1 parent f9e6b6b commit 707607c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

website/source/docs/internals/coordinates.html.markdown

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,6 @@ func dist(a *coordinate.Coordinate, b *coordinate.Coordinate) time.Duration {
155155
rtt = adjusted
156156
}
157157
158-
// Go's times are natively nanoseconds, so we convert from seconds.
159-
const secondsToNanoseconds = 1.0e9
160-
return time.Duration(rtt * secondsToNanoseconds)
158+
return time.Duration(rtt) * time.Second
161159
}
162160
```

0 commit comments

Comments
 (0)