How the Time Tracker Works
AnyTool Time Tracker is a stateful, 100% client-side timesheet. A start/stop timer is timestamp-based: it stores the epoch moment Start was pressed and computes elapsed = now − start on every tick, so the total self-corrects if a background tab is throttled or the machine sleeps. On Stop, the session is logged as an entry recording the project, task/description, start and end instants (epoch ms) and duration (ms); finished sessions can also be entered manually by start and end time, with an end earlier than the start interpreted as crossing midnight. Entries are appended to an array persisted to localStorage under the key "anytool_time_entries". A pure, unit-tested engine derives every aggregate — today and this-week totals, totals by project, and the entries grouped by local calendar day — taking "now" as a value the page supplies, so the engine is clock-free and never touches the DOM or storage. Nothing is sent to a server.
- Timer is timestamp-based (elapsed = now − start); self-corrects when throttled
- Entry: project, description, startMs, endMs, durationMs (all epoch/ms)
- Manual entries by start/end time; end < start means crossing midnight
- Persisted to browser localStorage (key "anytool_time_entries")
- Pure clock-free, DOM-free engine; the page owns the wall clock and persistence
