Based on this article about $resolve() in Outsystems and this link,I use async/await and Promise to create a sleep function in Client Side.Please be aware that this will only pause the execution of the code and doesn't put the thread to sleep. JavaScript in web browsers runs on a single thread and does not have access to the thread sleep function, setTimeout() is the only way to delay execution.