mirror of https://github.com/golang/go.git
time: fix Time package doc paragraph order
Introduce the presence of the monotonic time reading first, before the paragraph about comparison that mentions it multiple times. Change-Id: I91e31e118be013eee6c258163a1bb2cb42501527 Reviewed-on: https://go-review.googlesource.com/76010 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
8f70e1f8a9
commit
8615cbffe2
|
|
@ -98,6 +98,11 @@ import "errors"
|
|||
// change the instant in time being denoted and therefore does not affect the
|
||||
// computations described in earlier paragraphs.
|
||||
//
|
||||
// In addition to the required “wall clock” reading, a Time may contain an optional
|
||||
// reading of the current process's monotonic clock, to provide additional precision
|
||||
// for comparison or subtraction.
|
||||
// See the “Monotonic Clocks” section in the package documentation for details.
|
||||
//
|
||||
// Note that the Go == operator compares not just the time instant but also the
|
||||
// Location and the monotonic clock reading. Therefore, Time values should not
|
||||
// be used as map or database keys without first guaranteeing that the
|
||||
|
|
@ -108,11 +113,6 @@ import "errors"
|
|||
// correctly handles the case when only one of its arguments has a monotonic
|
||||
// clock reading.
|
||||
//
|
||||
// In addition to the required “wall clock” reading, a Time may contain an optional
|
||||
// reading of the current process's monotonic clock, to provide additional precision
|
||||
// for comparison or subtraction.
|
||||
// See the “Monotonic Clocks” section in the package documentation for details.
|
||||
//
|
||||
type Time struct {
|
||||
// wall and ext encode the wall time seconds, wall time nanoseconds,
|
||||
// and optional monotonic clock reading in nanoseconds.
|
||||
|
|
|
|||
Loading…
Reference in New Issue