fn current_slot_at(&self, at: &SystemTime) -> Option<(Epoch, u32, Duration)> {
        match self.get_era_at(at) {
            None => { None },
            Some((time_offset_in_era, era_epoch, era_cfg)) => {
                let flat_slot_index = time_offset_in_era.as_secs() / era_cfg.slot_duration.as_secs();
                let epoch = Epoch(era_epoch.0 + (flat_slot_index / era_cfg.slots_per_epoch as u64) as u32);
                let slot = (flat_slot_index as u32) % (era_cfg.slots_per_epoch as u32);

                let next_slot_time = era_cfg.slot_duration * ((flat_slot_index + 1) as u32);

                Some((epoch, slot, next_slot_time - time_offset_in_era))
            },
        }
    }
/// Return the slot id and the remaining duration of this slot
Return the slot id and the remaining duration of this slot
Return the slot id and the remaining duration of this slot
fn current_slot_at(&self, at: &SystemTime) -> Option<(Epoch, u32, Duration)> {
        match self.get_era_at(at) {
            None => { None },
            Some((time_offset_in_era, era_epoch, era_cfg)) => {
                let flat_slot_index = time_offset_in_era.as_secs() / era_cfg.slot_duration.as_secs();
                let epoch = Epoch(era_epoch.0 + (flat_slot_index / era_cfg.slots_per_epoch as u64) as u32);
                let slot = (flat_slot_index as u32) % (era_cfg.slots_per_epoch as u32);
                let next_slot_time = era_cfg.slot_duration * ((flat_slot_index + 1) as u32);
                Some((epoch, slot, next_slot_time - time_offset_in_era))
            },
        }
    }
fn current_slot_at ( & self , at : & SystemTime ) -> Option < ( Epoch , u32 , Duration ) > { match self . get_era_at ( at ) { None => { None } , Some ( ( time_offset_in_era , era_epoch , era_cfg ) ) => { let flat_slot_index = time_offset_in_era . as_secs ( ) / era_cfg . slot_duration . as_secs ( ) ; let epoch = Epoch ( era_epoch . 0 + ( flat_slot_index / era_cfg . slots_per_epoch as u64 ) as u32 ) ; let slot = ( flat_slot_index as u32 ) % ( era_cfg . slots_per_epoch as u32 ) ; let next_slot_time = era_cfg . slot_duration * ( ( flat_slot_index + 1 ) as u32 ) ; Some ( ( epoch , slot , next_slot_time - time_offset_in_era ) ) } , } }
Return the slot id and the remaining duration of this slot
Return the slot id and the remaining duration of this slot
&self
at
&SystemTime