Another solution is to use the pc Tween library to fake a delay in executing some code:
This has the advantage of sync its execution with the app update. Window timeout will still run even if the window isn’t focused, potentially can create issues in gameplay.