Skip to content

Commit f6e6b63

Browse files
Plasmatiumgopherbot
authored andcommitted
time: add notes about monotonic time paused
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 <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Joedian Reid <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent a81c8b3 commit f6e6b63

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/time/time.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@
5353
//
5454
// On some systems the monotonic clock will stop if the computer goes to sleep.
5555
// On such a system, t.Sub(u) may not accurately reflect the actual
56-
// time that passed between t and u.
56+
// time that passed between t and u. The same applies to other functions and
57+
// methods that subtract times, such as [Since], [Until], [Before], [After],
58+
// [Add], [Sub], [Equal] and [Compare]. In some cases, you may need to strip
59+
// the monotonic clock to get accurate results.
5760
//
5861
// Because the monotonic clock reading has no meaning outside
5962
// the current process, the serialized forms generated by t.GobEncode,

0 commit comments

Comments
 (0)