Skip to content

Commit

Permalink
scripts/action: printout script exec time
Browse files Browse the repository at this point in the history
  • Loading branch information
backslashxx committed Dec 15, 2024
1 parent d4aba91 commit ec62a2b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions module/action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ magisk_webui_redirect=1

# functions
bindhosts_sh() {
# grab start time
start_time=$(date +%s)
# call bindhosts.sh
sh $MODDIR/bindhosts.sh
# print exec time
echo "[+] execution time: $(( $(date +%s) - start_time ))s"
# no need to sleep on Magisk and MMRL
# environment stops exec and lets user read
[ -z "$MAGISKTMP" ] && [ -z "$MMRL" ] && sleep 2
# exit clean
exit 0
}

Expand Down

0 comments on commit ec62a2b

Please sign in to comment.