Update winapps

Signed-off-by: Oskar Manhart <52569953+oskardotglobal@users.noreply.github.com>
This commit is contained in:
eylenburg
2025-06-23 16:36:49 +01:00
committed by Oskar Manhart
parent fbb382e1e8
commit b53682be6c

View File

@@ -651,13 +651,16 @@ function waCheckIdle() {
# Name: 'waTimeSync'
# Role: Detect if system went to sleep by comparing uptime progression, then sync time in Windows VM
function waTimeSync() {
local CURRENT_TIME=$(date +%s)
local CURRENT_UPTIME="$(awk '{print int($1)}' "/proc/uptime")"
local CURRENT_TIME
local CURRENT_UPTIME
local STORED_TIME=0
local STORED_UPTIME=0
local EXPECTED_UPTIME=0
local UPTIME_DIFF=0
CURRENT_TIME=$(date +%s)
CURRENT_UPTIME=$(awk '{print int($1)}' /proc/uptime)
# Read stored values if file exists
if [ -f "$SLEEP_DETECT_PATH" ]; then
STORED_TIME=$(head -n1 "$SLEEP_DETECT_PATH" 2>/dev/null || echo 0)