stallNoticeThreshold function

Duration stallNoticeThreshold({
  1. required Duration noticeCeiling,
  2. required Duration window,
})

The stall NOTICE threshold for a run-idle window (gh-1617 open question 1, sketched default): the early "still waiting" UX feedback keeps its short ceiling (min(ceiling, window)) — the kill moves to the window, the notice never waits longer than the user is used to.

Implementation

Duration stallNoticeThreshold({
  required Duration noticeCeiling,
  required Duration window,
}) => window < noticeCeiling ? window : noticeCeiling;