Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Sleep/AWK/sleep.awk
Normal file
12
Task/Sleep/AWK/sleep.awk
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# syntax: GAWK -f SLEEP.AWK [seconds]
|
||||
BEGIN {
|
||||
print("Sleeping...")
|
||||
loop(ARGV[1])
|
||||
print("Awake!")
|
||||
exit(0)
|
||||
}
|
||||
function loop(seconds, t) {
|
||||
# awk lacks a sleep mechanism, so simulate one by looping
|
||||
t = systime()
|
||||
while (systime() < t + seconds) {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue