Skip to main content
. 2026 Sep 15;26(18):5846. doi: 10.3390/s26185846
Algorithm 2 Bounded Out-of-Order Event Handling with Single-Emission Windows
  • Require: 

    Event e with event timestamp te

  • Require: 

    Maximum out-of-orderness bound B

  • Require: 

    Maximum observed event time M, active windows A

  • Ensure: 

    The event is inserted into applicable non-finalized windows or discarded

  •   1:

    procedure ProcessEvent(e,te)

  •   2:

          M←max(M,te)

  •   3:

          ω←M−B

  •   4:

          if te<ω then

  •   5:

                DiscardAsTooLate(e)

  •   6:

                return

  •   7:

          end if

  •   8:

          CreateRequiredActiveWindows(te,ω,A)

  •   9:

          for all w∈A do

  • 10:

                if w.open≤te<w.close then

  • 11:

                     AddEvent(w,e)

  • 12:

                end if

  • 13:

          end for

  • 14:

          for all w∈A ordered by w.close do

  • 15:

                if w.close≤ω then

  • 16:

                     Rw← EvaluateWindow(w)

  • 17:

                     EmitResult(Rw)

  • 18:

                     A←A∖{w}

  • 19:

                end if

  • 20:

          end for

  • 21:

    end procedure