aboutsummaryrefslogtreecommitdiffstats
path: root/examples/process.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/process.rs')
-rw-r--r--examples/process.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/process.rs b/examples/process.rs
index 98236f7..ea36db1 100644
--- a/examples/process.rs
+++ b/examples/process.rs
@@ -20,7 +20,14 @@ fn process_frames(frames: &[Vec<u8>]) {
fn main() {
let frames: Vec<Vec<u8>> = read_frames().collect();
- for _ in 1..100 {
+ let start = std::time::Instant::now();
+ let mut i = 0;
+ loop {
+ i += 1;
process_frames(&frames);
+ if (std::time::Instant::now() - start).as_secs() >= 30 {
+ break;
+ }
}
+ eprintln!("{} iterations", i);
}