-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
misc.lua
42 lines (31 loc) · 794 Bytes
/
misc.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
local mytimer = tmr.create()
if not mytimer:alarm(5000, tmr.ALARM_SINGLE, function()
print("hey there")
end)
then
print("whoopsie")
end
initTimer = tmr.create()
initTimer:alarm(1000, tmr.ALARM_SINGLE,
function()
local fi=node.flashindex; return pcall(fi and fi'_init')
end
)
local initTimer = tmr.create()
initTimer:register(1000, tmr.ALARM_SINGLE,
function()
local fi=node.flashindex; return pcall(fi and fi'_init')
end
)
initTimer:start()
if not tmr.create():alarm(5000, tmr.ALARM_SINGLE, function()
print("hey there")
end)
then
print("whoopsie")
end
mytimer = tmr.create()
mytimer:alarm(30, tmr.ALARM_AUTO, function() print("hey test") end)
--mytimer:interval(3000) -- actually, 3 seconds is better!
--mytimer:start()
mytimer:stop()