Skip to content

Commit

Permalink
time: add notes about monotonic time paused
Browse files Browse the repository at this point in the history
See #66870

Change-Id: I781265355a3dbd0d9538bc9dcafaa83b482ec3f8
GitHub-Last-Rev: 9d92f11
GitHub-Pull-Request: #66922
Reviewed-on: https://go-review.googlesource.com/c/go/+/580515
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Joedian Reid <joedian@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
Plasmatium authored and gopherbot committed Apr 29, 2024
1 parent a81c8b3 commit f6e6b63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/time/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f6e6b63

Please sign in to comment.