1. Programs should be nice
- Posted by unkmar Sep 20, 2008
- 882 views
The settings I would prefer to use below are.
tdelay = 0.1 -- sleep(0.1) My version doesn't support it. :( timeout = 1 -- be nice every second. Bad idea if above not available.
-- This will work across days. -- if time() is extremely smaller than timer then readjust atom timer, timeout, tdelay tdelay = 1 -- second timeout = 5 -- seconds timer = time() + timeout global procedure benice() atom tfuture tfuture = time() + timeout if ((time() > timer) or (timer > future)) then timer = future sleep(tdelay) end if end procedure
Unkmar - Lucius L. Hilley III
2. Re: Programs should be nice
- Posted by unkmar Sep 20, 2008
- 896 views
unkmar said...
The settings I would prefer to use below are.
tdelay = 0.1 -- sleep(0.1) My version doesn't support it. :( timeout = 1 -- be nice every second. Bad idea if above not available.
TYPO: corrected, future is suppose to be tfuture
-- This will work across days. -- if time() is extremely smaller than timer then readjust atom timer, timeout, tdelay tdelay = 1 -- second timeout = 5 -- seconds timer = time() + timeout global procedure benice() atom tfuture tfuture = time() + timeout if ((time() > timer) or (timer > tfuture)) then timer = tfuture sleep(tdelay) end if end procedure
Unkmar - Lucius L. Hilley III
3. Re: Programs should be nice
- Posted by ne1uno Sep 20, 2008
- 933 views
in eu4 an include std/socket.e
gives you public function delay(atom millisec)
delay() probably should be moved to os.e or task.e
4. Re: Programs should be nice
- Posted by jimcbrown (admin) Sep 20, 2008
- 971 views
ne1uno said...
in eu4 an include std/socket.e
gives you public function delay(atom millisec)
delay() probably should be moved to os.e or task.e
change that from public to global, and that function (delay() ) will work on eu 2.2 or eu 3.0
sleep(0.1) only works on eu 4.0