mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 02:39:13 +00:00
The background loop ran on a fixed 60 s open, 120 s closed, whatever the Usage refresh setting said beyond Manual, and whatever the machine was running on. Every tick is a full Node process, so a laptop on battery paid the same as one on the wall. The arithmetic is now RefreshCadence.swift's, in Rust where it can be tested and where the power read belongs: Auto is 30 s while the popover is open, 120 s hidden on AC, 150 s on battery and 300 s in battery saver (GetSystemPowerStatus through the windows-sys dependency, one new feature flag). Manual answers nothing and the loop stops until the popover opens or Refresh is pressed. A fixed cadence is what it says, except that an open popover always gets the active one, as on the mac: the reader is looking at those numbers. The page asks for a plan on every tick rather than arming one interval, because the power state changes under a timer that has already been armed. Debug builds print each plan on stderr. |
||
|---|---|---|
| .. | ||
| capabilities | ||
| icons | ||
| src | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| tauri.conf.json | ||