Skip to content

Commit

Permalink
final fix? maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
six2dez committed Mar 4, 2024
1 parent a9f7c2e commit 807690e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions reconftw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2734,9 +2734,8 @@ function sendToNotify {
}

function start_func() {
current_date=$(date +'%Y-%m-%d %H:%M:%S')
printf "${bgreen}#######################################################################"
notification "${2}" info $current_date
notification "${2}" info
echo "[$current_date] Start function: ${1} " >>"${LOGFILE}"
start=$(date +%s)
}
Expand All @@ -2745,16 +2744,14 @@ function end_func() {
touch $called_fn_dir/.${2}
end=$(date +%s)
getElapsedTime $start $end
current_date=$(date +'%Y-%m-%d %H:%M:%S')
notification "${2} Finished in ${runtime}" info $current_date
notification "${2} Finished in ${runtime}" info
echo "[$current_date] End function: ${2} " >>"${LOGFILE}"
printf "${bblue}[$current_date] ${1} ${reset}\n"
printf "${bgreen}#######################################################################${reset}\n"
}

function start_subfunc() {
current_date=$(date +'%Y-%m-%d %H:%M:%S')
notification " ${2}" info $current_date
notification " ${2}" info
echo "[$current_date] Start subfunction: ${1} " >>"${LOGFILE}"
start_sub=$(date +%s)
}
Expand All @@ -2763,8 +2760,7 @@ function end_subfunc() {
touch $called_fn_dir/.${2}
end_sub=$(date +%s)
getElapsedTime $start_sub $end_sub
current_date=$(date +'%Y-%m-%d %H:%M:%S')
notification " ${1} in ${runtime}" good $current_date
notification " ${1} in ${runtime}" good
echo "[$current_date] End subfunction: ${1} " >>"${LOGFILE}"
}

Expand Down

0 comments on commit 807690e

Please sign in to comment.