SetInterval and SetTimeout usage with Forge UI

Hi everyone!

Is it possible to use the setInterval() and setTimeout() functions with Forge UI?
If yes, could you describe how?

Thanks in advance for your help,
Gyöngyi

1 Like

Hi @GyngyiKiss,

setInterval() and setTimeout() should largely work how they do in Node with the notable exception that our runtime will not wait for all timers / callbacks to complete before halting execution. If all sync and async code from your function handler finishes executing before the timeout is triggered then the runtime will clean up and the timer callback will never be executed.

3 Likes