A really, really simple tool to calculate how many hours you've spent in a browser using the time difference between browser history items, a.k.a. the Inactivity Threshold.
I did this to roughly calculate time spent on a client who has a monthly retainer with me.
To check your usage in Chrome, you'll need to use another browser, say Brave to check your Chrome usage. You'll also need to quit Chrome completely. At the moment, you can't check your browser time for a browser that's currently in use.
If the time gap between two browser history items, a.k.a. the Inactivity Threshold, is more than 20 minutes, the time between those two browser history items isn't counted.
uv venv .venv
.\.venv\Scripts\activate
source .venv/bin/activate
uv pip install gradio
python3 calculate_browser_hours.py
- Google Chrome
- Brave
- Arc
- Safari
- Firefox