From: Olav Bakke Svendsen Date: Wed, 18 Oct 2023 02:15:19 +0000 (+0200) Subject: Renaming file X-Git-Tag: stable-steam X-Git-Url: http://git.olavbs.no/?a=commitdiff_plain;h=322fe2c7264fb3058457659c9057dd91681238fe;p=cc.git Renaming file --- diff --git a/common/delayed-startup.lua b/common/delayed-startup.lua new file mode 100644 index 0000000..d400cf4 --- /dev/null +++ b/common/delayed-startup.lua @@ -0,0 +1,28 @@ +-- delayed-startup.lua +-- save as "/startup.lua" and modify delay and run + +-- delay in seconds +local delay = 60 + +-- what to do after delay +local run = function() + +end + + + +local wait = os.startTimer(60) +term.clear() +term.setCursorPos(1,1) +print("Starting in "..tostring(delay).." seconds") +print("Press any key to cancel...") +while true do + local e, t = os.pullEvent() + if e == "timer" and t == wait then + run() + elseif e == "char" then + print("Canceled") + os.cancelTimer(wait) + break + end +end diff --git a/common/delayed_startup.lua b/common/delayed_startup.lua deleted file mode 100644 index 4bacbbb..0000000 --- a/common/delayed_startup.lua +++ /dev/null @@ -1,28 +0,0 @@ --- delayed_startup.lua --- save as "/startup.lua" and modify delay and run - --- delay in seconds -local delay = 60 - --- what to do after delay -local run = function() - -end - - - -local wait = os.startTimer(60) -term.clear() -term.setCursorPos(1,1) -print("Starting in "..tostring(delay).." seconds") -print("Press any key to cancel...") -while true do - local e, t = os.pullEvent() - if e == "timer" and t == wait then - run() - elseif e == "char" then - print("Canceled") - os.cancelTimer(wait) - break - end -end