From 13a420a5b10d43c3835e40eb2e1e75ac3756a588 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Fri, 30 Nov 2018 16:26:58 +0100 Subject: [PATCH] Outputting script execution time --- music-sync.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/music-sync.sh b/music-sync.sh index c7f4403..b3ed53d 100755 --- a/music-sync.sh +++ b/music-sync.sh @@ -1,5 +1,6 @@ #!/bin/bash +begin=$(date +"%s") # saner programming env: these switches turn some bugs into errors set -o errexit -o pipefail -o noclobber -o nounset source="-" @@ -203,4 +204,8 @@ if [[ ! -f /tmp/music-sync-filelist ]]; then fi ConvertFiles CopyFiles -CleanUp \ No newline at end of file +CleanUp + +termin=$(date +"%s") +difftimelps=$(($termin-$begin)) +VerboseOutput 1 "$(($difftimelps / 60)) minutes and $(($difftimelps % 60)) seconds elapsed for Script Execution." \ No newline at end of file