RosettaCodeData/Task/Sleep/Jq/sleep.jq
2023-07-01 13:44:08 -04:00

7 lines
221 B
Text

# Pseudosleep for at least the given number of $seconds (a number)
# and emit the actual number of seconds that have elapsed.
def sleep($seconds):
now
| . as $now
| until( . - $now >= $seconds; now)
| . - $now ;