From b53682be6c5f81bf6cda2aaabb6827f1470f8e82 Mon Sep 17 00:00:00 2001 From: eylenburg <84839316+eylenburg@users.noreply.github.com> Date: Mon, 23 Jun 2025 16:36:49 +0100 Subject: [PATCH] Update winapps Signed-off-by: Oskar Manhart <52569953+oskardotglobal@users.noreply.github.com> --- bin/winapps | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/winapps b/bin/winapps index 01a8bf0..f8c30cc 100755 --- a/bin/winapps +++ b/bin/winapps @@ -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)