Commit e3ee9112 authored by w4t's avatar w4t

wtserver 0.38

parent f428f2d0
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Install and configure SQL Server (MySQL or MariaDB) # Install and configure SQL Server (MySQL or MariaDB)
#--------------------------------------------------------------------- #---------------------------------------------------------------------
InstallSQLServer() { InstallSQLServer() {
local START_TIME=$(date +%s.%N) local START_TIME=$(date +%s)
if [ $CFG_SQLSERVER == "MySQL" ]; then if [ $CFG_SQLSERVER == "MySQL" ]; then
echo -n -e "$IDENTATION_LVL_0 ${BWhite}Installing MySQL${NC}\n" echo -n -e "$IDENTATION_LVL_0 ${BWhite}Installing MySQL${NC}\n"
......
...@@ -19,13 +19,13 @@ MeasureTimeDuration() { ...@@ -19,13 +19,13 @@ MeasureTimeDuration() {
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "-Parameter #1 is zero length." # Or no parameter passed. echo "-Parameter #1 is zero length." # Or no parameter passed.
else else
# Kiszámítjuk az eltelt időt nanoszekundumos pontossággal CURRENT_TIME=$(date +%s)
END_TIME=$(date +%s.%N) START_TIME_SEC=${1%.*}
ELAPSED_TIME=$(echo "$END_TIME - $1" | bc)
# Percek és másodpercek kiszámítása ELAPSED_TIME=$(($CURRENT_TIME - $START_TIME_SEC))
MINUTES=$(echo "scale=0; $ELAPSED_TIME/60" | bc)
SECONDS=$(echo "scale=1; $ELAPSED_TIME-($MINUTES*60)" | bc) MINUTES=$(($ELAPSED_TIME / 60))
SECONDS=$(($ELAPSED_TIME % 60))
echo -n -e "$IDENTATION_LVL_0 ${green}Completed ON ${NC}" echo -n -e "$IDENTATION_LVL_0 ${green}Completed ON ${NC}"
echo -e ": ${red} $MINUTES min $SECONDS sec ${NC}" echo -e ": ${red} $MINUTES min $SECONDS sec ${NC}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment