move dirs
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
def every(period : Time::Span, &block : -> T) forall T
|
||||
spawn do
|
||||
loop do
|
||||
block.call
|
||||
sleep period
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
every(2.seconds) {
|
||||
puts "-@-@-"
|
||||
}
|
||||
|
||||
every(4.seconds) {
|
||||
puts "(-.-)Zzz..."
|
||||
}
|
||||
|
||||
sleep
|
||||
Reference in New Issue
Block a user