Created
December 24, 2014 02:42
-
-
Save ophentis/db691586d0b9b3afba2d to your computer and use it in GitHub Desktop.
onep lua - looping through datasource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local devices = alias['devices_cp'] | |
-- reset last pointer | |
devices.last = 0 | |
local value = true | |
local count = 0 | |
local ts = now | |
while count < 1000 and value do | |
-- counting | |
value = devices.wait(ts) | |
count = count + 1 | |
end | |
debug('elapsed' .. tostring(now-ts) .. 'seconds') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment