Skip to main content

window_of

Function window_of 

Source
pub(crate) fn window_of(timestamp_unix_ns: i64, rotate_secs: u64) -> i64
Expand description

Returns the rotation window a timestamp falls in.

Windows start at multiples of rotate_secs since the Unix epoch, as in the archiver.

ยงArguments

  • timestamp_unix_ns - Sample time in Unix nanoseconds.
  • rotate_secs - Window length in seconds. 0 is treated as 1.