Tests for Timer.sleep().

This commit is contained in:
Bob Nystrom
2015-08-08 07:17:30 -07:00
parent d4acbe8a70
commit 9845ed5126
10 changed files with 95 additions and 5 deletions
+20
View File
@@ -0,0 +1,20 @@
import "timer" for Timer
// These are both rounded to 1, so "a" should complete first.
Fiber.new {
Timer.sleep(1.5)
IO.print("a")
}.call()
Fiber.new {
Timer.sleep(1.3)
IO.print("b")
}.call()
IO.print("main")
Timer.sleep(3)
IO.print("done")
// expect: main
// expect: a
// expect: b
// expect: done