Use timestamp to track idle time, rather than a counter.
Stop idle timer when starting a break