Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Sleep/Groovy/sleep-1.groovy
Normal file
5
Task/Sleep/Groovy/sleep-1.groovy
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
def sleepTest = {
|
||||
println("Sleeping...")
|
||||
sleep(it)
|
||||
println("Awake!")
|
||||
}
|
||||
12
Task/Sleep/Groovy/sleep-2.groovy
Normal file
12
Task/Sleep/Groovy/sleep-2.groovy
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
sleepTest(1000)
|
||||
print '''
|
||||
Hmmm. That was... less than satisfying.
|
||||
How about this instead?
|
||||
'''
|
||||
Thread.start {
|
||||
(0..5).each {
|
||||
println it
|
||||
sleep(1000)
|
||||
}
|
||||
}
|
||||
sleepTest(5000)
|
||||
Loading…
Add table
Add a link
Reference in a new issue