gameloop/
gameloop.rs

1fn update(frame_num: u32) {
2    optick::event!();
3    optick::tag!("frame", frame_num);
4
5    use std::{thread, time};
6    let duration = time::Duration::from_millis(33);
7    thread::sleep(duration);
8}
9
10pub fn main() {
11    let mut frame = 0; 
12    loop {
13        optick::next_frame();
14        update(frame);
15        frame = frame + 1;
16    }
17}