Last active
January 4, 2021 22:09
-
-
Save namikingsoft/1810faacfdb1483aab11cbf20557f40d to your computer and use it in GitHub Desktop.
Repeat seconds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TIMEOUT_UNIXTIME="$(($(date +%s)+10))" | |
while [ "$(date +%s)" -lt "$TIMEOUT_UNIXTIME" ]; do | |
echo test | |
done | |
# bash | |
$TIMEOUT_SECONDS=$((SECONDS+10)) | |
while [ $SECONDS -lt $TIMEOUT_SECONDS ]; do | |
echo test | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment