Page 1 of 1

evTimer question

Posted: 14.03.2015 15:49
by verbin

Code: Select all

Program New;
procedure timer1();
begin
  uosay('this sub thread');
end;
begin
SetEventProc(evTimer1,'timer1'); 
while true do
begin
 uosay('this main thread');
 wait(10);
 end;
end.
this code,timer1 Don't work
and....where set Time interval? User manual is Russian,not english
SetEventProc function is Multi thread or Single thread?

Re: evTimer question

Posted: 14.03.2015 19:10
by Gauhar
Sorry for my bad English.
Maybe on your shard works antispam?
I tested your script with AddToSystemJournal:

Code: Select all

17:38:25:984 [Local-A]: Compiling
17:38:26:031 [Local-A]: Compiled succesfully
17:38:26:031 [Local-A]: this MAIN thread
17:38:26:046 [Local-A]: this MAIN thread
17:38:26:062 [Local-A]: this MAIN thread
17:38:26:078 [Local-A]: this MAIN thread
17:38:26:109 [Local-A]: this MAIN thread
17:38:26:125 [Local-A]: this MAIN thread
17:38:26:140 [Local-A]: this SUB thread
17:38:26:140 [Local-A]: this MAIN thread
17:38:26:171 [Local-A]: this MAIN thread
17:38:26:187 [Local-A]: this MAIN thread
17:38:26:203 [Local-A]: this MAIN thread
17:38:26:218 [Local-A]: this MAIN thread
17:38:26:234 [Local-A]: this SUB thread
17:38:26:234 [Local-A]: this MAIN thread
17:38:26:250 [Local-A]: this MAIN thread
17:38:26:265 [Local-A]: this MAIN thread
17:38:26:281 [Local-A]: this MAIN thread
17:38:26:296 [Local-A]: this MAIN thread
17:38:26:312 [Local-A]: this MAIN thread
17:38:26:328 [Local-A]: this MAIN thread
17:38:26:343 [Local-A]: this SUB thread
17:38:26:359 [Local-A]: this MAIN thread
17:38:26:375 [Local-A]: this MAIN thread
17:38:26:390 [Local-A]: this MAIN thread
17:38:26:406 [Local-A]: this MAIN thread
17:38:26:421 [Local-A]: this MAIN thread
17:38:26:437 [Local-A]: this MAIN thread
17:38:26:437 [Local-A]: this SUB thread
17:38:26:468 [Local-A]: this MAIN thread
17:38:26:953 [Local-A]: Succesfully executed
17:38:26:953 [Local-A]: Script test evTimer.sc stopped successfuly

Re: evTimer question

Posted: 15.03.2015 16:37
by Vizit0r
period is constant = 100ms
SetEventProc function is Multi thread or Single thread?
works in same thread, where handler setted.

btw, in russian manuals this also not written ))