add suggested frame pacing

This commit is contained in:
Vinzenz Schroeter 2024-05-17 23:56:08 +02:00
parent 6a2ee5fcfa
commit 46c9174d3d
5 changed files with 21 additions and 16 deletions

View file

@ -1,10 +1,11 @@
use std::thread;
use std::time::Duration;
use clap::Parser;
use rand::{distributions, Rng};
use servicepoint2::{Command, CompressionCode, Connection, Origin, PixelGrid};
use servicepoint2::{
Command, CompressionCode, Connection, Origin, PixelGrid, FRAME_PACING,
};
#[derive(Parser, Debug)]
struct Cli {
@ -32,7 +33,7 @@ fn main() {
.into(),
)
.expect("could not send");
thread::sleep(Duration::from_millis(30));
thread::sleep(FRAME_PACING);
field = iteration(field);
}
}