@@ -173,11 +173,11 @@ def _timestamp_to_rel_index(self, timestamp: datetime) -> int:
173173
174174 # distance between the input ts and the ts of oldest known samples (in samples)
175175 dist_to_oldest = int (
176- (timestamp - self ._buffer .time_bound_oldest ) / self ._sampling_period
176+ (timestamp - self ._buffer .oldest_timestamp ) / self ._sampling_period
177177 )
178178
179179 _logger .debug ("Shifting ts: %s" , timestamp )
180- _logger .debug ("Oldest timestamp in buffer: %s" , self ._buffer .time_bound_oldest )
180+ _logger .debug ("Oldest timestamp in buffer: %s" , self ._buffer .oldest_timestamp )
181181 _logger .debug ("Distance to the oldest sample: %i" , dist_to_oldest )
182182
183183 return dist_to_oldest
@@ -275,7 +275,7 @@ def _get_relative_positions(
275275
276276 # check if the newest time bound, i.e. the sample that is currently written,
277277 # is inside the interval
278- rb_current_position = self ._buffer .time_bound_newest
278+ rb_current_position = self ._buffer .newest_timestamp
279279 rel_next_position = (
280280 self ._timestamp_to_rel_index (rb_current_position ) + 1
281281 ) % self ._period
@@ -339,7 +339,7 @@ def _get_buffer_bounds(
339339
340340 # get the start and end position inside the ringbuffer
341341 end_pos = (
342- self ._timestamp_to_rel_index (self ._buffer .time_bound_newest ) + 1
342+ self ._timestamp_to_rel_index (self ._buffer .newest_timestamp ) + 1
343343 ) - dist_to_start
344344
345345 # Note that these check is working since we are using the positions
@@ -356,7 +356,7 @@ def _get_buffer_bounds(
356356
357357 # add the offset to the oldest sample in the ringbuffer and wrap around
358358 # to get the start and end positions in the ringbuffer
359- rb_offset = self ._buffer .datetime_to_index (self ._buffer .time_bound_oldest )
359+ rb_offset = self ._buffer .datetime_to_index (self ._buffer .oldest_timestamp )
360360 start_pos = self ._buffer .wrap (end_pos + self ._period + rb_offset )
361361 end_pos = self ._buffer .wrap (end_pos + rb_offset )
362362
0 commit comments