Records a level and returns the samples left before the threshold.
Returns 0 once the level is at or below the threshold, the first reading included,
and null while the level is steady or rising, or on a first reading above it,
when no rate of fall is known yet.
Warns before a falling level runs out, by projecting its rate of fall.