summary refs log tree commit diff stats
path: root/lib/std/monotimes.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2021-06-03 16:27:34 +0200
committerGitHub <noreply@github.com>2021-06-03 16:27:34 +0200
commit0aa8b793a5f5ef58afe5e8aa96b7646a8afde765 (patch)
tree1226d7d13bc0798e32db0e1d486038113d2fcb37 /lib/std/monotimes.nim
parent7ef364a402d3d827f10c893280f8dc7b9ef056f5 (diff)
downloadNim-0aa8b793a5f5ef58afe5e8aa96b7646a8afde765.tar.gz
clarify what a 'monotonic' timestamp is (#18163)
Diffstat (limited to 'lib/std/monotimes.nim')
-rw-r--r--lib/std/monotimes.nim5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/std/monotimes.nim b/lib/std/monotimes.nim
index 8f6aa5b66..3bb4fa141 100644
--- a/lib/std/monotimes.nim
+++ b/lib/std/monotimes.nim
@@ -10,7 +10,7 @@
 ##[
 The `std/monotimes` module implements monotonic timestamps. A monotonic
 timestamp represents the time that has passed since some system defined
-point in time. The monotonic timestamps are guaranteed to always increase,
+point in time. The monotonic timestamps are guaranteed not to decrease,
 meaning that that the following is guaranteed to work:
 ]##
 
@@ -18,9 +18,8 @@ runnableExamples:
   import std/os
 
   let a = getMonoTime()
-  sleep(10)
   let b = getMonoTime()
-  assert a < b
+  assert a <= b
 
 ##[
 This is not guaranteed for the `times.Time` type! This means that the