meassure time in linpeas

This commit is contained in:
Carlos Polop
2021-06-18 18:37:02 +02:00
parent 8fdff63f61
commit d657fb2b7e
3 changed files with 160 additions and 118 deletions

View File

@@ -544,10 +544,32 @@ echo_no (){
}
print_title(){
END_T2_TIME=`date +%s 2>/dev/null`
if [ "$START_T2_TIME" ]; then
TOTAL_T2_TIME=$(($END_T2_TIME - $START_T2_TIME))
printf $DG"The section execution took $TOTAL_T2_TIME seconds\n"$NC
fi
END_T1_TIME=`date +%s 2>/dev/null`
if [ "$START_T1_TIME" ]; then
TOTAL_T1_TIME=$(($END_T1_TIME - $START_T1_TIME))
printf $DG"The total section execution took $TOTAL_T1_TIME seconds\n"$NC
echo ""
fi
START_T1_TIME=`date +%s 2>/dev/null`
printf ${BLUE}"════════════════════════════════════╣ "$GREEN"$1"${BLUE}" ╠════════════════════════════════════\n"$NC
}
print_2title(){
END_T2_TIME=`date +%s 2>/dev/null`
if [ "$START_T2_TIME" ]; then
TOTAL_T2_TIME=$(($END_T2_TIME - $START_T2_TIME))
printf $DG"The section execution took $TOTAL_T2_TIME seconds\n"$NC
echo ""
fi
START_T2_TIME=`date +%s 2>/dev/null`
printf ${BLUE}"╔══════════╣ "$GREEN"$1\n"$NC #There are 10 "═"
}