SigintPolicy class final
Press-window state for the double-press contract. Not serialized, not restored: the window lives only in the running process.
The window is measured on a monotonic Stopwatch, not wall-clock
DateTime math: an NTP correction or VM pause/resume stepping the
clock backwards must never turn a minutes-late press into "press 2".
Constructors
- SigintPolicy({Duration window = kSigintPressWindow, Stopwatch stopwatch()?})
Properties
- armed → bool
-
Whether a press 1 is currently inside the window (drives the TUI's
dim footer hint).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- window → Duration
-
How long press 2 may follow press 1. Presses past the window start a
fresh press-1 cycle.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
noteOtherInput(
) → void - Any other key/input resets the window (issue #830): the next Ctrl+C is a fresh press 1, and the armed hint goes away.
-
press(
{required bool headless}) → SigintAction - Resolves the action for one Ctrl+C press and arms the window.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited