mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-15 10:46:12 -04:00
lastScanAt was read and written inside the log lambdas, which only run while a logger is attached (log() checks Logging.hasReceivers first). In a release build with recording off, the bookkeeping therefore never happened, so the first delay of every debug recording reported the time since the *previous* recording ended. Two logs from a support case opened with delay=878453ms and delay=359983ms, which read as 14 and 6 minutes of suppressed scanning but were just the gap between recordings. The bookkeeping moves out of the lambdas, and the clock changes from currentTimeMillis to elapsedRealtime so a wall-clock correction cannot fabricate a gap either. That also puts the delay in the same boot-clock domain as ScanResult.timestampNanos.