From e97ceb278297a357580cd80a651c39158f82d45e Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 6 May 2022 15:43:48 -0700 Subject: [PATCH] time: clarify that monotonic clock is not returned by t.Unix Prompted by CL 403996. Change-Id: I8b480a9d361863d4770c7c9a4437431424f26994 Reviewed-on: https://go-review.googlesource.com/c/go/+/404695 Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Reviewed-by: Rob Pike TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor Reviewed-by: Heschi Kreinick --- src/time/time.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/time/time.go b/src/time/time.go index 95963b6bf3..4cf3a5cd68 100644 --- a/src/time/time.go +++ b/src/time/time.go @@ -64,6 +64,10 @@ // 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 -- 2.50.0