[−][src]Function simpleterm::text::check_flash
pub fn check_flash(now: Instant, then: &mut Instant) -> bool
Determines if enough time has passed since the last flash toggle. If so, save the current time and toggle the current flash state.
let mut start: Instant = Instant::now(); thread::sleep(FLASH_TIME); assert!(check_flash(Instant::now(), &mut start));