summaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-02-16 15:17:37 +0100
committerLudovic Courtès <ludo@gnu.org>2018-02-16 15:29:35 +0100
commit39860539599f74958c0cc9008fc6fa271349b58b (patch)
tree4d2b10f1d8476d3c9ec5854be9111c46e4cb0a16 /test-suite
parent2c7b350f93564daee16a311c001a85577d4b69e1 (diff)
srfi-18: 'thread-sleep!' timeout-as-a-number is relative.
This is a followup to <https://bugs.gnu.org/29704>. * module/srfi/srfi-18.scm (thread-sleep!): When TIMEOUT is a number, keep it as-is. * test-suite/tests/srfi-18.test ("thread sleep with number"): Pass 0 as the timeout. ("thread sleeps fractions of a second"): Pass 0.5 as the timeout.
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/tests/srfi-18.test5
1 files changed, 2 insertions, 3 deletions
diff --git a/test-suite/tests/srfi-18.test b/test-suite/tests/srfi-18.test
index fc36dab8a..e5473391a 100644
--- a/test-suite/tests/srfi-18.test
+++ b/test-suite/tests/srfi-18.test
@@ -94,13 +94,12 @@
(unspecified? (thread-sleep! future-time))))
(pass-if "thread sleep with number"
- (let ((old-secs (car (current-time))))
- (unspecified? (thread-sleep! (+ (time->seconds (current-time)))))))
+ (unspecified? (thread-sleep! 0)))
(pass-if "thread sleeps fractions of a second"
(let* ((current (time->seconds (current-time)))
(future (+ current 0.5)))
- (thread-sleep! future)
+ (thread-sleep! 0.5)
(>= (time->seconds (current-time)) future)))
(pass-if "thread does not sleep on past time"