Commit c96ac60b authored by Ian Lance Taylor's avatar Ian Lance Taylor

time: document that going to sleep may stop the monotonic clock

Fixes #23178

Change-Id: I060a73d6263bc135f5a14c1991932a225208bb39
Reviewed-on: https://go-review.googlesource.com/103396Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 86181120
...@@ -51,6 +51,10 @@ ...@@ -51,6 +51,10 @@
// readings. If either t or u contains no monotonic clock reading, these // readings. If either t or u contains no monotonic clock reading, these
// operations fall back to using the wall clock readings. // operations fall back to using the wall clock readings.
// //
// 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.
//
// Because the monotonic clock reading has no meaning outside // Because the monotonic clock reading has no meaning outside
// the current process, the serialized forms generated by t.GobEncode, // the current process, the serialized forms generated by t.GobEncode,
// t.MarshalBinary, t.MarshalJSON, and t.MarshalText omit the monotonic // t.MarshalBinary, t.MarshalJSON, and t.MarshalText omit the monotonic
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment