mirror of
https://github.com/winapps-org/winapps.git
synced 2025-10-09 01:29:30 +02:00
Update winapps
Signed-off-by: Oskar Manhart <52569953+oskardotglobal@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user