Skip to content

Instantly share code, notes, and snippets.

@cbillowes
Last active October 17, 2018 17:02
Show Gist options
  • Save cbillowes/ee2b2b9f0ec27d428eaa820a1a6f2242 to your computer and use it in GitHub Desktop.
Save cbillowes/ee2b2b9f0ec27d428eaa820a1a6f2242 to your computer and use it in GitHub Desktop.
Stopwatch
#!/bin/bash
echo "Stopwatch"
date1=`date +%s`;
while true; do
echo -ne "$(date -u --date @$((`date +%s` - $date1)) +%H:%M:%S)\r";
sleep 0.1
done
# chmod +x stopwatch
# stopwatch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment