Last active
February 8, 2023 20:11
-
-
Save wadewilliams/cb5c90ea9a94797aeff0e884aa518549 to your computer and use it in GitHub Desktop.
Report how long portions of a bash script take to run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function clock_time { | |
duration=$SECONDS | |
echo -e "$ARROW $(($duration / 60))m$(($duration % 60))s elapsed." | |
} | |
# Usage | |
SECONDS=0 | |
thing_you_want_to_clock_goes_here | |
clock_time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment