ferristype 1.0.2

FerrisType is a minimalist typing game where your sole task is to type whatever appears on your terminal screen. Test and improve your typing speed and accuracy as random words and phrases appear, challenging you to type them quickly and correctly. Embrace the simplicity, hone your typing skills, and reach new levels of typing mastery in this immersive terminal-based game.
Documentation
use std::time::{Duration, Instant};
use termion::event::Key;

#[derive(Default, Debug)]
pub struct Timer {
    pub timer: Option<Instant>,
    pub key_timer: Vec<(Duration, Key)>,
    pub word_list: Vec<String>,
}

impl Timer {
    pub fn record_key(&mut self, k: Key) {
        if let None = self.timer {
            self.timer = Some(Instant::now());
        }
        let t = self.timer.unwrap().elapsed();
        self.key_timer.push((t, k));
    }
}