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 that you accept these cookies being set.

Os.sleep function
#1
I am running a simple timer. But now the client want the ability to change the os.sleep time.
Probably a stupid question but is there a possibility to connect a virtual address to the os.sleep and then have the abiliity to change the sleep time?



grp.write('26/6/183', true)
os.sleep(1800)
Reply
#2
Like this, but value change won't affect any script that's already sleeping.
Code:
value = grp.getvalue('1/1/1')
os.sleep(value)
Reply
#3
If it was just triggered it will run this example the 1800 seconds. 
Then next time it will add the new value. 

Is this correctly understood?
Reply
#4
The next time it will use the new value if the value has been changed during os.sleep call.
Reply


Forum Jump: