pub fn time_until_next(now: Duration, slot_duration: u64) -> Duration {
	let remaining_full_secs = slot_duration - (now.as_secs() % slot_duration) - 1;
	let remaining_nanos = 1_000_000_000 - now.subsec_nanos();
	Duration::new(remaining_full_secs, remaining_nanos)
}
/// Returns the duration until the next slot, based on current duration since
Returns the duration until the next slot, based on current duration since
Returns the duration until the next slot based on current duration since
pub fn time_until_next(now: Duration, slot_duration: u64) -> Duration {
	let remaining_full_secs = slot_duration - (now.as_secs() % slot_duration) - 1;
	let remaining_nanos = 1_000_000_000 - now.subsec_nanos();
	Duration::new(remaining_full_secs, remaining_nanos)
}
pub fn time_until_next ( now : Duration , slot_duration : u64 ) -> Duration { let remaining_full_secs = slot_duration - ( now . as_secs ( ) % slot_duration ) - 1 ; let remaining_nanos = 1_000_000_000 - now . subsec_nanos ( ) ; Duration :: new ( remaining_full_secs , remaining_nanos ) }
Returns the duration until the next slot, based on current duration since
Returns the duration until the next slot based on current duration since
now
Duration
slot_duration
u64
now
Duration
slot_duration
u64