TypeScript Stopwatch Utility
JSON →ts-stopwatch is a convenient, stopwatch-inspired timer utility for measuring durations of time between different points of execution in code. It supports pausing, resuming, resetting, and recording multiple 'slices' of time, akin to a physical stopwatch's lap functionality. Written entirely in TypeScript, it provides 100% accurate type definitions, making it suitable for both TypeScript and JavaScript environments. The package, currently at version 0.0.4, appears to have an inactive development status, with no significant updates in recent years. A key feature is its ability to customize the underlying time source, allowing developers to opt for more precise or stable timers like `process.hrtime()` in Node.js, addressing potential inaccuracies from system clock adjustments that `Date.now()` might face. It ships with both CommonJS and ES modules.
Traffic · last 30 days ↓33% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany · 🇳🇱 Netherlands