Skip to main content

take_turns

Function take_turns 

Source
fn take_turns<T>(
    due: Vec<T>,
    room: &mut usize,
    next: &mut usize,
) -> (Vec<T>, usize)
Expand description

Takes the due metrics that fit in room, starting at *next and wrapping around, and moves *next past them, so that metrics left out go first in a later flush. Returns the metrics taken, and how many were left out.