Reschedulable Timer

JSON →
library 4.0.0 ·javascript
verified May 27, 2026

Retimer is a JavaScript library providing a reschedulable alternative to Node.js's native `setTimeout`. It is specifically designed for scenarios requiring frequent timer rescheduling, such as managing keep-alive functionality across numerous client connections or sockets, where repeatedly clearing and setting `setTimeout` can become a performance bottleneck due to Node.js's internal timer linked list management. The library works by allowing old timers to run out naturally while scheduling new ones, optimizing performance when rescheduling a timeout *after* its original duration. The current stable version is 4.0.0, which notably introduced TypeScript types and support for `worker-timers`. While release cadence isn't strictly defined, major versions appear every few years, indicating a mature and stable project. Its key differentiator is the performance optimization for 'reschedule after' scenarios, aiming for better efficiency than naive `clearTimeout`/`setTimeout` cycles.

total hits 13
actors 6 distinct systems
last hit 6d ago Googlebot
GPTBot
5
Script
1
ClaudeBot
1
Search engines
3

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France