SHOW:
|
|
- or go back to the newest paste.
1 | - | redOn = false |
1 | + | redStart = nil |
2 | while true do | |
3 | local ev,p1 = os.pullEvent("redstone") | |
4 | - | if ev == "redstone" then |
4 | + | if rs.testBundledInput("back",colors.red) then |
5 | - | if rs.testBundledInput("back",colors.red) then |
5 | + | redStart = os.clock() |
6 | - | if not redOn then |
6 | + | else |
7 | - | redOn = true |
7 | + | if redStart ~= nil then |
8 | - | redStart = os.clock() |
8 | + | print("Seconds passed: " .. ( os.clock() - redStart )) |
9 | - | end |
9 | + | redStart = nil |
10 | - | else |
10 | + | |
11 | - | if redOn then |
11 | + | |
12 | - | redOn = false |
12 | + |