: unix-time>timestamp ( seconds -- timestamp )
seconds unix-1970 time+ ;
-M: duration sleep duration>nanoseconds nano-count + sleep-until ;
+M: duration sleep
+ duration>nanoseconds >integer nano-count + sleep-until ;
{
{ [ os unix? ] [ "calendar.unix" ] }
USING: namespaces io tools.test threads kernel
concurrency.combinators concurrency.promises locals math
-words ;
+words calendar ;
IN: threads.tests
3 "x" set
[ t ] [ spawn-namespace-test ] unit-test
[ "a" [ 1 1 + ] spawn 100 sleep ] must-fail
+
+[ ] [ 0.1 seconds sleep ] unit-test