-
Martin Möhrmann authored
Do not lose precision for durations specified without fractions that can be represented by an int64 such as 1<<53+1 nanoseconds. Previously there was some precision lost in floating point conversion. Handle overflow for durations above 1<<63-1 nanoseconds but not earlier. Add tests to cover the above cases. Change-Id: I4bcda93cee1673e501ecb6a9eef3914ee29aecd2 Reviewed-on: https://go-review.googlesource.com/2461Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
d1210acf