dotfiles/scripts/speedrun-timer

8 lines
277 B
Plaintext
Raw Normal View History

2022-02-06 19:45:28 +01:00
#!/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