From efe0c23ddfa13baaaf15db67f008b413fecfbdf6 Mon Sep 17 00:00:00 2001 From: Blaise Thompson Date: Mon, 26 Mar 2018 14:47:07 -0500 Subject: countdown --- dotfiles/bashrc.sync | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'dotfiles/bashrc.sync') diff --git a/dotfiles/bashrc.sync b/dotfiles/bashrc.sync index 72fc9fd..cf7dc81 100644 --- a/dotfiles/bashrc.sync +++ b/dotfiles/bashrc.sync @@ -4,3 +4,18 @@ export PATH="/opt/anaconda/bin:$PATH" export VISUAL=vim export EDITOR="$VISUAL" + +function blaise() { + echo hello +} + + +function countdown(){ + secs=$(($1 * 60)); + date1=$((`date +%s` + "$secs")); + while [ "$date1" -ge `date +%s` ]; do + echo -ne "$(date -u --date @$(($date1 - `date +%s`)) +%H:%M:%S)\r"; + sleep 0.1 + done +} + -- cgit v1.2.3