]> Cypherpunks repositories - gostls13.git/commit
time: print zero duration as 0s, not 0
authorRob Pike <r@golang.org>
Thu, 21 Apr 2016 21:53:19 +0000 (14:53 -0700)
committerRob Pike <r@golang.org>
Thu, 21 Apr 2016 22:07:59 +0000 (22:07 +0000)
commit9c4295b574a89bf02294111f811f90ab06b9951b
tree03ac053a086b34c29d3d6fa61864fbe7cf32fd4c
parenta33e9cf7ead3d7853546a71796a6c404d02cb474
time: print zero duration as 0s, not 0

There should be a unit, and s is the SI unit name, so use that.
The other obvious possibility is ns (nanosecond), but the fact
that durations are measured in nanoseconds is an internal detail.

Fixes #14058.

Change-Id: Id1f8f3c77088224d9f7cd643778713d5cc3be5d9
Reviewed-on: https://go-review.googlesource.com/22357
Reviewed-by: Robert Griesemer <gri@golang.org>
src/time/time.go
src/time/time_test.go