Return time instant when the oldest element is leaving the buffer
function nextLeaving input Buffer buffer "Memory of sliding window"; input Real t "Actual time instant"; output Modelica.SIunits.Time t_next "Next time instant where the oldest value (t,b) in the buffer is leaving the time window"; end nextLeaving;