Commit 1d1ccdfb authored by Vladislav's avatar Vladislav

Update debug_timer

parent ceaa7da2
...@@ -744,12 +744,15 @@ debug_timer () { ...@@ -744,12 +744,15 @@ debug_timer () {
START=$(date +%s%N) START=$(date +%s%N)
elif [[ "$1" == "--end" ]] ; then elif [[ "$1" == "--end" ]] ; then
END=$(date +%s%N) END=$(date +%s%N)
DIFF=$((( END - START )/1000000))
if [[ -n "$2" ]] ; then if [[ -n "$2" ]] ; then
if [[ "$2" != "-s" ]] ; then if [[ "$2" == "-s" ]] ; then
export "$3"=$((( END - START )/1000000 ))
else
DIFF=$((( END - START )/1000000 ))
print_warning "It took $DIFF milliseconds for $2" print_warning "It took $DIFF milliseconds for $2"
fi fi
else else
DIFF=$((( END - START )/1000000 ))
print_warning "It took $DIFF milliseconds" print_warning "It took $DIFF milliseconds"
fi fi
fi fi
...@@ -1761,8 +1764,7 @@ pw_port_update () { ...@@ -1761,8 +1764,7 @@ pw_port_update () {
print_warning "https://gitlab.eterfund.ru/ broken. Skip it..." print_warning "https://gitlab.eterfund.ru/ broken. Skip it..."
UPDATE_SKIP_ETERFUND="1" UPDATE_SKIP_ETERFUND="1"
fi fi
debug_timer --end -s debug_timer --end -s "UPDATE_ETERFUND"
UPDATE_ETERFUND="$DIFF"
debug_timer --start debug_timer --start
if ! timeout 2 curl -f -s --list-only "$URL_GITHUB" > "${PORT_WINE_TMP_PATH}/curent_var_ver" if ! timeout 2 curl -f -s --list-only "$URL_GITHUB" > "${PORT_WINE_TMP_PATH}/curent_var_ver"
...@@ -1770,8 +1772,7 @@ pw_port_update () { ...@@ -1770,8 +1772,7 @@ pw_port_update () {
print_warning "https://raw.githubusercontent.com/ broken. Skip it..." print_warning "https://raw.githubusercontent.com/ broken. Skip it..."
UPDATE_SKIP_GITHUB="1" UPDATE_SKIP_GITHUB="1"
fi fi
debug_timer --end -s debug_timer --end -s "UPDATE_GITHUB"
UPDATE_GITHUB="$DIFF"
if [[ "$UPDATE_SKIP_ETERFUND" == "1" ]] \ if [[ "$UPDATE_SKIP_ETERFUND" == "1" ]] \
&& [[ "$UPDATE_SKIP_GITHUB" == "1" ]] ; then && [[ "$UPDATE_SKIP_GITHUB" == "1" ]] ; then
......
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