summaryrefslogtreecommitdiff
path: root/test-suite/tests/srfi-18.test
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite/tests/srfi-18.test')
-rw-r--r--test-suite/tests/srfi-18.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/test-suite/tests/srfi-18.test b/test-suite/tests/srfi-18.test
index 47f8f7f40..ab055132e 100644
--- a/test-suite/tests/srfi-18.test
+++ b/test-suite/tests/srfi-18.test
@@ -96,6 +96,12 @@
(let ((old-secs (car (current-time))))
(unspecified? (thread-sleep! (+ (time->seconds (current-time)))))))
+ (pass-if "thread sleeps fractions of a second"
+ (let* ((current (time->seconds (current-time)))
+ (future (+ current 0.5)))
+ (thread-sleep! future)
+ (>= (time->seconds (current-time)) future)))
+
(pass-if "thread does not sleep on past time"
(let ((past-time (seconds->time (- (time->seconds (current-time)) 2))))
(unspecified? (thread-sleep! past-time)))))
@@ -479,4 +485,4 @@
(eq? (uncaught-exception-reason obj) 'foo)
(set! success #t)))
(lambda () (thread-join! t)))
- success))))) \ No newline at end of file
+ success)))))