From 3cea4a857bb8caf7128d1dadbd411e5bd59a8577 Mon Sep 17 00:00:00 2001 From: jon Date: Thu, 23 Jun 2022 08:18:43 -0500 Subject: [PATCH] Added stopwatch function to bashrc --- bash/.bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bash/.bashrc b/bash/.bashrc index 56a6e3e..c635a7b 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -106,6 +106,11 @@ if [ -f /usr/share/fzf/shell/key-bindings.bash ]; then source /usr/share/fzf/shell/key-bindings.bash fi +#this is a stopwatch function, call with: $ stopwatch +stopwatch () { + date1=`date +%s`; while true; do echo -ne "$(date -u --date @$((`date +%s` - $date1)) +%H:%M:%S)\r"; done +} + n () { # Block nesting of nnn in subshells