Skip to main content

Module cooldown

Module cooldown 

Source

Constants§

DEFAULT_COOLDOWN_SECS

Functions§

cooldown_remaining
Returns Some(seconds_remaining) if the cooldown is still active, or None if the cooldown has elapsed or no previous run was recorded.
last_run_path
Returns the platform-appropriate path for the last-run timestamp file. Linux/macOS: ~/.local/share/speedtest/last_run Windows: %APPDATA%\speedtest\last_run
record_successful_run
Writes the current Unix timestamp to the last-run file. Creates the directory if it does not exist. Called only on successful test completion - failed runs do not reset the cooldown clock.