sxmo_suspend: rework time accounting to be more similar to upstream

This commit is contained in:
2023-10-10 10:05:09 +00:00
parent 760326b38b
commit 1bf829dcf0

View File

@@ -19,11 +19,11 @@ doas rtl8723cs-wowlan arp --dest-ip 10.78.79.54
echo "calling suspend for duration: $suspend_time" echo "calling suspend for duration: $suspend_time"
start=$(date "+%s") start="$(date "+%s")"
rtcwake -m mem -s "$suspend_time" || exit 1 rtcwake -m mem -s "$suspend_time" || exit 1
end=$(date "+%s") #We woke up again
duration=$(("$end" - "$start") time_spent="$(( $(date "+%s") - start ))"
echo "suspended for $duration seconds" echo "suspended for $time_spent seconds"
sxmo_hook_postwake.sh sxmo_hook_postwake.sh