From e71a798f1d48184a52eecbab26d7546db33a3d81 Mon Sep 17 00:00:00 2001 From: Htylol Date: Thu, 1 Aug 2024 21:42:40 +0500 Subject: [PATCH] Update debug_timer --- data_from_portwine/scripts/functions_helper | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index be3bc80d..17b5f430 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -483,7 +483,11 @@ debug_timer () { elif [[ "$1" == "--end" ]] ; then END=$(date +%s%N) DIFF=$((($END - $START)/1000000)) - print_warning "It took $DIFF milliseconds for $2" + if [[ -n "$2" ]] ; then + print_warning "It took $DIFF milliseconds for $2" + else + print_warning "It took $DIFF milliseconds" + fi fi }