]> Cypherpunks.ru repositories - gostls13.git/commitdiff
time: clarify that monotonic clock is not returned by t.Unix
authorIan Lance Taylor <iant@golang.org>
Fri, 6 May 2022 22:43:48 +0000 (15:43 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 13 May 2022 21:01:13 +0000 (21:01 +0000)
Prompted by CL 403996.

Change-Id: I8b480a9d361863d4770c7c9a4437431424f26994
Reviewed-on: https://go-review.googlesource.com/c/go/+/404695
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Rob Pike <r@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
src/time/time.go

index 95963b6bf319a664064ed419a8821cf148103712..4cf3a5cd684b257c2f93f5604208484a7081a217 100644 (file)
 // t.UnmarshalJSON, and t.UnmarshalText always create times with
 // no monotonic clock reading.
 //
+// The monotonic clock reading exists only in Time values. It is not
+// a part of Duration values or the Unix times returned by t.Unix and
+// friends.
+//
 // Note that the Go == operator compares not just the time instant but
 // also the Location and the monotonic clock reading. See the
 // documentation for the Time type for a discussion of equality