Page 1 of 1

timer

Posted: 2008-09-17 16:02:49
by zars

Code: Select all

until uo.InJournal('put') OR uo.InJournal('fail') OR WAIT 10 sec



how to make OR wait10sec? i dont understand what timers do


Code: Select all

until uo.InJournal('put') OR uo.InJournal('fail') OR LastTimer+300<UO.Timer()

i think dont work , but i dont realy know how much time is LastTimer+300<UO.Timer()

please help

Posted: 2008-09-18 07:12:09
by Destruction
uo.timer() returns number, this number increased by 1 each 1/10 sec.

Example:

Code: Select all

LastTimer = uo.timer() ; remember current timer value.
repeat
    wait( 100 )
until uo.InJournal( 'message' ) OR LastTimer+300 < uo.timer()

as result - loop wait for 'message' in journal and will break after 30 seconds.