Get the size in timedelta of the window.
(self)
| 327 | self.onRemoved and self.onRemoved(oldest) |
| 328 | |
| 329 | def duration(self): |
| 330 | """ Get the size in timedelta of the window. """ |
| 331 | if not self.data: |
| 332 | return datetime.timedelta(0) |
| 333 | return self.get_ts(self.data[-1]) - self.get_ts(self.data[0]) |
| 334 | |
| 335 | def count(self): |
| 336 | """ Count the number of events in the window. """ |