Skip to content

Commit

Permalink
coordinates.html.markdown: simplify duration calc (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbourgon authored Nov 10, 2021
1 parent f9e6b6b commit 707607c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions website/source/docs/internals/coordinates.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ func dist(a *coordinate.Coordinate, b *coordinate.Coordinate) time.Duration {
rtt = adjusted
}
// Go's times are natively nanoseconds, so we convert from seconds.
const secondsToNanoseconds = 1.0e9
return time.Duration(rtt * secondsToNanoseconds)
return time.Duration(rtt) * time.Second
}
```

0 comments on commit 707607c

Please sign in to comment.