def CreateFromRangeInterval(firstTime: datetime, lastTime: datetime,
                             interval: timedelta, tolerance: timedelta):
     """
     Creates a seek filter over a single date range (inclusive list), skipping values
     based on specified `timedelta` interval and tolerance.
     
     Parameters
     ----------
     firstTime: the first time if the query (inclusive).
     lastTime: the last time of the query (inclusive).
     interval: the exact interval for the scan. Example: 0.1 seconds.
     tolerance: the width of every window. Example: 0.001 seconds.
     """
     return timestampSeekFilter(Ticks.FromDateTime(firstTime),
                                Ticks.FromDateTime(lastTime),
                                Ticks.FromTimeDelta(interval),
                                Ticks.FromTimeDelta(interval),
                                Ticks.FromTimeDelta(tolerance))
 def CreateFromRangeSubInterval(firstTime: datetime, lastTime: datetime,
                                mainInterval: timedelta,
                                subInterval: timedelta,
                                tolerance: timedelta):
     """
     Creates a seek filter over a single date range (inclusive list), skipping values
     based on specified `timedelta` main /sub intervals and tolerance.
     
     Parameters
     ----------
     firstTime: the first time if the query (inclusive).
     lastTime: the last time of the query (inclusive).
     mainInterval: the smallest interval that is exact. Example: 0.1 seconds.
     subInterval: the interval that will be parsed (round possible). Example: 0.0333333 seconds.
     tolerance: the width of every window. Example: 0.001 seconds.
     """
     return timestampSeekFilter(Ticks.FromDateTime(firstTime),
                                Ticks.FromDateTime(lastTime),
                                Ticks.FromTimeDelta(mainInterval),
                                Ticks.FromTimeDelta(subInterval),
                                Ticks.FromTimeDelta(tolerance))
 def Save(self, stream: binaryStream):
     stream.WriteByte(0)
     stream.WriteUInt64(Ticks.FromTimeDelta(self.timeout))
     stream.WriteUInt64(self.maxReturnedCount)
     stream.WriteUInt64(self.maxScanCount)
     stream.WriteUInt64(self.maxSeekCount)