dotfiles/scripts/speedrun-timer

8 lines
277 B
Bash
Executable File

#!/bin/bash
STARTTIME=$(date +%s.%3N)
echo "End timing with ctrl-c."
while true; do
DUR=$(printf "%.3f" $(bc <<< $(date +%s.%3N)-$STARTTIME))
printf "\r%s " $(date +%T.%3N -u -d "@${DUR}")
done