From: plasmatium Date: Fri, 26 Apr 2024 01:15:34 +0000 (+0000) Subject: time: add notes about monotonic time paused X-Git-Tag: go1.23rc1~502 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f6e6b637c0c5e66d177becd4b3539d54636f5705;p=gostls13.git time: add notes about monotonic time paused See #66870 Change-Id: I781265355a3dbd0d9538bc9dcafaa83b482ec3f8 GitHub-Last-Rev: 9d92f116b05db5568dd4d5834bace659eaf8cc49 GitHub-Pull-Request: golang/go#66922 Reviewed-on: https://go-review.googlesource.com/c/go/+/580515 Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Reviewed-by: Joedian Reid LUCI-TryBot-Result: Go LUCI --- diff --git a/src/time/time.go b/src/time/time.go index 8c24e1c481..0bbdeaecf5 100644 --- a/src/time/time.go +++ b/src/time/time.go @@ -53,7 +53,10 @@ // // On some systems the monotonic clock will stop if the computer goes to sleep. // On such a system, t.Sub(u) may not accurately reflect the actual -// time that passed between t and u. +// time that passed between t and u. The same applies to other functions and +// methods that subtract times, such as [Since], [Until], [Before], [After], +// [Add], [Sub], [Equal] and [Compare]. In some cases, you may need to strip +// the monotonic clock to get accurate results. // // Because the monotonic clock reading has no meaning outside // the current process, the serialized forms generated by t.GobEncode,