Reschedulable Timer
JSON →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.
Traffic · last 30 days ↓91% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France