timer/
timer.rs

1use noct::{Key, KeyboardControllable, Noct};
2use std::thread;
3use std::time::Duration;
4use std::time::Instant;
5
6fn main() {
7    thread::sleep(Duration::from_secs(2));
8    let mut noct = Noct::new();
9
10    let now = Instant::now();
11
12    // write text
13    noct.key_sequence("Hello World! ❤️");
14
15    let time = now.elapsed();
16    println!("{:?}", time);
17
18    // select all
19    noct.key_down(Key::Control);
20    noct.key_click(Key::Layout('a'));
21    noct.key_up(Key::Control);
22}