← 教程列表
news

When Arbitrary Timeout IS Correct

📅 2026/6/12 16:30:02⏱ 约 5 分钟阅读👁 9 阅读

```typescript // Tool ticks every 100ms - need 2 ticks to verify partial output await waitForEvent(manager, 'TOOL_STARTED'); // First: wait for condition await new Promise(r => setTimeout(r, 200)); // Then: wait for timed behavior // 200ms = 2 ticks at 100ms intervals - documented and justified ``` **Requirements:** 1. First wait for triggering condition 2. Based on known timing (not guessing) 3. Comment explaining WHY

← 返回教程列表 AI8899 · 内容仅供学习参考