Oh, that'll be great! That's not
quite the same as a sliding window of last 5 minutes, but it'll definitely work for my use case.
(Intuitively, a sliding window seems very hard/impossible -- how do you discard old events without keeping a complete record?)