From a4e81c184a600078c41a2965722fe5acf4c5527b Mon Sep 17 00:00:00 2001 From: Felisp Date: Mon, 8 Jan 2024 21:15:26 +0100 Subject: [PATCH] Sarting time now starts when it should - after we fall asleep --- sleepCalc.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/sleepCalc.lua b/sleepCalc.lua index 479e017..759fcab 100755 --- a/sleepCalc.lua +++ b/sleepCalc.lua @@ -34,6 +34,7 @@ local now = os.time(); print("If gonna fall sleep at: " .. os.date("%H:%M", now + (gonnaFallAsleepIn * 60))); print("Wake up | to sleep\n------------------"); +now = now + (gonnaFallAsleepIn * 60); -- We need to start counting from when we fall asleep local sleepLen = actualSleepCycle; for i = 0, 7, 1 do print(os.date("%H:%M", now + (actualSleepCycle * 60)) .. " | " .. getHoursAndMinsString(sleepLen));