removeOldEvents

abstract fun removeOldEvents(maxSize: Long, maxAge: Duration)

Remove events older than maxAge seconds and keep only the latest maxSize events.

Parameters

maxSize

the maximum number of events to keep.

maxAge

the maximum age of events to keep.