Instantly share code, notes, and snippets.

Embed
What would you like to do?
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