RosettaCodeData/Task/Sleep/Tcl/sleep-2.tcl
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

8 lines
196 B
Tcl

puts -nonewline "Enter a number of milliseconds to sleep: "
flush stdout
set millis [gets stdin]
set ::wakupflag 0
puts Sleeping...
after $millis set ::wakeupflag 1
vwait ::wakeupflag
puts Awake!