I want to display the "real world" time once per minute. I have a simple function that I call using a timer. The function is:
function fn_echotime ()
Note (" RW time is: " .. os.date () )
end
I would like to augment this simple function so that it "holds" until the real world clock hits "00" seconds. So I wrote the following function:
function fn_echotime ()
secs = os.date ("%S")
if secs ~= "00" then
nrsecs = 60 - tonumber(secs)
Note (nrsecs)
require "wait"
wait.make (function ()
Note ("Inside timer")
wait.time (nrsecs)
end)
end
ColourNote ("grey", "darkblue", " RW time is: " .. os.date () .. " ")
end
The two Note functions return expected values. But the timer does not seem to run, as the function never returns :00 as seconds. I'm sure I'm doing something utterly simple to fix, but I'm stumped.
TIA
function fn_echotime ()
Note (" RW time is: " .. os.date () )
end
I would like to augment this simple function so that it "holds" until the real world clock hits "00" seconds. So I wrote the following function:
function fn_echotime ()
secs = os.date ("%S")
if secs ~= "00" then
nrsecs = 60 - tonumber(secs)
Note (nrsecs)
require "wait"
wait.make (function ()
Note ("Inside timer")
wait.time (nrsecs)
end)
end
ColourNote ("grey", "darkblue", " RW time is: " .. os.date () .. " ")
end
The two Note functions return expected values. But the timer does not seem to run, as the function never returns :00 as seconds. I'm sure I'm doing something utterly simple to fix, but I'm stumped.
TIA