use std::time::Instant;

pub fn calc_crc8_itu(c: &[u8]) -> u8 {
    let crc8_itu_alg = crc::Crc::<u8>::new(&crc::CRC_8_I_432_1);
    crc8_itu_alg.checksum(c)
}

pub fn elapsed_millis(start_at: Instant) -> u64 {
    start_at.elapsed().as_millis() as u64
}
