will wait one second
or an event before.
will wait one year
or an event before.
Then, for this last way, if an event occurs before one year of waiting, what is over (after and before WaitWE() statement inside the main loop) is executed and WaitWE() will wait again one year or a new event before.
Globally, the delay argument inside WaitWE() is a
maximum duration.
If
you want to execute a procedure on a set delay (not on a maximum delay, just on a set delay), you should use the two functions before the main loop :
AddWindowTimer()
(here you set window id, timer id and duration in milliseconds).
BindEvent()
(here you set the event code - #pb_event_timer - , the window id and the procedure address to be executed everytime the time is elapsed).