Phase 6 - remaining time info

This commit is contained in:
jpirnay
2026-05-20 09:55:49 +02:00
parent b4738fee0c
commit 375c73b03b
16 changed files with 216 additions and 14 deletions
+8
View File
@@ -49,6 +49,14 @@ void ReadingSessionTracker::updateProgress(uint8_t progress) {
lastKnownProgress = progress;
}
void ReadingSessionTracker::markFinished() {
if (!active) return;
const int64_t walltime = HalClock::isSynced() ? static_cast<int64_t>(HalClock::now()) : 0;
READING_STATS.markFinished(docId, title, author, static_cast<time_t>(walltime));
READING_STATS.saveToFile();
LOG_DBG("RST", "Marked finished doc=%s wall=%lld", docId.c_str(), (long long)walltime);
}
void ReadingSessionTracker::end() {
if (!active) return;
// Final idle flush so we credit the time between the last page turn and now,