This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

Time to switch from "false" to "true"!
Hi everybody ! I have a little trouble? Hope everybody help please:

-My address changes from "false" to "true", it needs to be 1.254s. I see it in the "Update at" section. How do I know that time? I want to do something with this "1,254s".

Thank so much everybody !

Attached Files Image(s)
delta variable will have the time between FALSE and TRUE values in seconds.
value = event.getvalue()

if value then
  prevtime = storage.get('prevtime')
  if prevtime then
    delta = os.udifftime(unpack(prevtime))
  storage.set('prevtime', { os.microtime() })

Forum Jump: