class

CRE::Tui::Snapshotter

Inherits Reference < Object

Snapshotter polls the persistence layer at a low frequency and updates State#creds_total / due_now / overdue. The TUI render path reads the cached snapshot, never the database — so a slow query can't stall frame paint.

Constants

Log = ::Log.for("cre.tui.snapshotter")

Constructors

new(state : State, persistence : Persistence::Persistence, policies : Array(Policy::Policy) = Policy.registry, interval : Time::Span = 5.seconds)
Source

Instance methods

refresh
Source
start
Source
stop
Source