mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
chore: Refactor _get_fastest function to improve readability and performance
This commit is contained in:
parent
7af514e5e7
commit
adb91c29e8
@ -222,7 +222,7 @@ function _get_fastest() {
|
||||
URL="$(echo "${fastest}" | awk '{print $1}')"
|
||||
SPD="$(echo "${fastest}" | awk '{print $2}')" # It is a float type
|
||||
echo "${URL}"
|
||||
[ $(printf "%.0f" ${SPD:-999}) -ge 999 ] && return 1 || return 0
|
||||
[ $(echo ${SPD:-999} | cut -d. -f1) -ge 999 ] && return 1 || return 0
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user