def duration(self):
        if not self.data:
            return datetime.timedelta(0)
        return self.get_ts(self.data[-1]) - self.get_ts(self.data[0])
Get the size in timedelta of the window.
dataset/ETHPy150Open Yelp/elastalert/elastalert/ruletypes.py/EventWindow.duration