Improved timer example
Also pushed other half of system::fs rename
This commit is contained in:
@@ -2,8 +2,9 @@ import system::async::(set_timer, yield)
|
||||
import system::io::(readln, println)
|
||||
import std::exit_status
|
||||
|
||||
const main := (
|
||||
set_timer true 1 (println "y" yield) \cancel.
|
||||
readln \a.
|
||||
cancel exit_status::success
|
||||
)
|
||||
const main := do{
|
||||
cps cancel = set_timer true 1 (println "y" yield);
|
||||
cps _ = readln;
|
||||
cps cancel;
|
||||
exit_status::success
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user