Skip to main content

find_closest_index

Function find_closest_index 

Source
pub fn find_closest_index(timestamps: &[i64], target: i64) -> Option<usize>
Expand description

Find the closest index in a sorted array of timestamps Returns the index of the timestamp closest to the target