Files
bun.sh/test/regression/issue
robobun 3196178fa7 fix(timers): add _idleStart property to Timeout object (#26021)
## Summary

- Add `_idleStart` property (getter/setter) to the Timeout object
returned by `setTimeout()` and `setInterval()`
- The property returns a monotonic timestamp (in milliseconds)
representing when the timer was created
- This mimics Node.js's behavior where `_idleStart` is the libuv
timestamp at timer creation time

## Test plan

- [x] Verified test fails with `USE_SYSTEM_BUN=1 bun test
test/regression/issue/25639.test.ts`
- [x] Verified test passes with `bun bd test
test/regression/issue/25639.test.ts`
- [x] Manual verification:
  ```bash
  # Bun with fix - _idleStart exists
./build/debug/bun-debug -e "const t = setTimeout(() => {}, 0);
console.log('_idleStart' in t, typeof t._idleStart); clearTimeout(t)"
  # Output: true number
  
  # Node.js reference - same behavior
node -e "const t = setTimeout(() => {}, 0); console.log('_idleStart' in
t, typeof t._idleStart); clearTimeout(t)"
  # Output: true number
  ```

Closes #25639

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 19:35:11 -08:00
..
2025-08-06 06:44:46 -07:00
2025-01-28 17:23:57 -08:00
2025-06-03 13:23:12 -07:00
2025-06-03 23:41:37 -07:00
2025-01-17 22:08:07 -08:00
2024-06-14 01:50:36 -07:00
2025-03-03 21:38:05 -08:00
2025-05-26 21:18:22 -07:00
2025-07-03 01:06:22 -07:00
2025-07-23 22:31:42 -07:00
2025-10-20 14:07:31 -07:00
2025-11-05 22:04:14 -08:00
2025-11-05 22:04:14 -08:00
2025-11-19 21:17:51 -08:00
2025-07-20 23:02:10 -07:00