12. Inter-Frame Communication Techniques : Communicating Between OpenROAD Frames : How You Can Communicate Between Frames Using User Events : Delay Parameter
 
Share this page                  
Delay Parameter
When you want to repeat a task at regular intervals, such as polling the database for changes or updating the time on a clock, you can trigger a user event after a specified amount of time. The delay parameter of the SendUserEvent lets you specify a number of seconds to wait before triggering the user event.
OpenROAD triggers the user event after the specified time has elapsed. In the meantime, OpenROAD continues executing the current event block, and events can continue to be triggered in any of the currently active frames. The default delay is 0.0 seconds (in other words, the event is triggered immediately).
In the following example, we use the delay parameter to update a block every 10 seconds:
initialize =
begin
    CurFrame.SendUserEvent (eventname= 'clock');
end;

on userevent 'clock' =
begin
    current_time = date('now');
    CurFrame.SendUserEvent(eventname= 'clock',
    delay = 10.0);
end