Skip to content

Instantly share code, notes, and snippets.

@Sanix-Darker
Created March 21, 2023 09:11
Show Gist options
  • Save Sanix-Darker/bf178a6a4d025fe31d477179a4f25efc to your computer and use it in GitHub Desktop.
Save Sanix-Darker/bf178a6a4d025fe31d477179a4f25efc to your computer and use it in GitHub Desktop.
#!/bin/bash
# _sleep 10
_sleep(){
seconds=$1
start="$(($(date +%s) + $seconds))"
while [ "$start" -ge `date +%s` ]; do
time="$(( $start - `date +%s` ))"
printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)"
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment