magic number: make 8 years in seconds a constant

master
Anjandev Momi 4 years ago
parent 11f2777e0f
commit 23acd8a8c2
  1. 6
      scripts/core/sxmo_screenlock.sh

@ -131,8 +131,10 @@ elif [ "$1" = "crust" ] ; then
xset dpms force off
suspend_time="$(($(mnc)-10))"
if [ "$suspend_time" -gt 268435455 ]; then
suspend_time=268435455
YEARS8_TO_SEC=268435455
if [ "$suspend_time" -gt "$YEARS8_TO_SEC" ]; then
suspend_time="$YEARS8_TO_SEC"
fi
if [ "$suspend_time" -gt 0 ]; then
rtcwake -m mem -s "$suspend_time"

Loading…
Cancel
Save