@@ -172,11 +172,11 @@ def _timestamp_to_rel_index(self, timestamp: datetime) -> int:
172172
173173        # distance between the input ts and the ts of oldest known samples (in samples) 
174174        dist_to_oldest  =  int (
175-             (timestamp  -  self ._buffer .time_bound_oldest ) /  self ._sampling_period 
175+             (timestamp  -  self ._buffer .oldest_timestamp ) /  self ._sampling_period 
176176        )
177177
178178        _logger .debug ("Shifting ts: %s" , timestamp )
179-         _logger .debug ("Oldest timestamp in buffer: %s" , self ._buffer .time_bound_oldest )
179+         _logger .debug ("Oldest timestamp in buffer: %s" , self ._buffer .oldest_timestamp )
180180        _logger .debug ("Distance to the oldest sample: %i" , dist_to_oldest )
181181
182182        return  dist_to_oldest 
@@ -274,7 +274,7 @@ def _get_relative_positions(
274274
275275        # check if the newest time bound, i.e. the sample that is currently written, 
276276        # is inside the interval 
277-         rb_current_position  =  self ._buffer .time_bound_newest 
277+         rb_current_position  =  self ._buffer .newest_timestamp 
278278        rel_next_position  =  (
279279            self ._timestamp_to_rel_index (rb_current_position ) +  1 
280280        ) %  self ._period 
@@ -338,7 +338,7 @@ def _get_buffer_bounds(
338338
339339        # get the start and end position inside the ringbuffer 
340340        end_pos  =  (
341-             self ._timestamp_to_rel_index (self ._buffer .time_bound_newest ) +  1 
341+             self ._timestamp_to_rel_index (self ._buffer .newest_timestamp ) +  1 
342342        ) -  dist_to_start 
343343
344344        # Note that these check is working since we are using the positions 
@@ -355,7 +355,7 @@ def _get_buffer_bounds(
355355
356356        # add the offset to the oldest sample in the ringbuffer and wrap around 
357357        # to get the start and end positions in the ringbuffer 
358-         rb_offset  =  self ._buffer .datetime_to_index (self ._buffer .time_bound_oldest )
358+         rb_offset  =  self ._buffer .datetime_to_index (self ._buffer .oldest_timestamp )
359359        start_pos  =  self ._buffer .wrap (end_pos  +  self ._period  +  rb_offset )
360360        end_pos  =  self ._buffer .wrap (end_pos  +  rb_offset )
361361
0 commit comments