Add timeouts

This commit is contained in:
YourWishes committed 2026-06-06 10:38:10 -05:00
1 parent 6f47543720
commit 9068d96130
6 files changed
+132 -2

No files matched your search

+2 -2
View File
@@ -13,9 +13,9 @@ Console.print('Platform: ' + (platformNames[System.platform] || 'Unknown'));
// Testing async/await
async function testAsync() {
Console.print('Testing async/await...');
await new Promise(resolve => requestAnimationFrame(resolve));
await frame();
Console.print('First await done!');
await new Promise(resolve => setTimeout(resolve, 1000));
await timeout(1000);
Console.print('Async/await works!');
}