Added countdown timer
This commit is contained in:
parent
74f1200c25
commit
829579ca90
@ -86,3 +86,13 @@ alias tootctl='docker exec -it -w /app/www mastodon bin/tootctl'
|
||||
alias hackingtool='docker run -it --net=host --privileged vgpastor/hackingtool'
|
||||
# Do you need to reboot? Find out here!
|
||||
alias needrs='[ -f /var/run/reboot-required ] && echo "You need to reboot"'
|
||||
|
||||
# Countdown Timer
|
||||
countdown() {
|
||||
start="$(( $(date '+%s') + $1))"
|
||||
while [ $start -ge $(date +%s) ]; do
|
||||
time="$(( $start - $(date +%s) ))"
|
||||
printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)"
|
||||
sleep 0.1
|
||||
done
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user