asyncio sleep js code example
Example 1: async sleep javascript
await new Promise(r => setTimeout(r, 2000));
Example 2: asyncio sleep
#will sleep the current corutien for set numner of seconds
import asyncio
await asyncio.sleep(1)
await new Promise(r => setTimeout(r, 2000));
#will sleep the current corutien for set numner of seconds
import asyncio
await asyncio.sleep(1)