mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 05:51:03 +01:00
printing average frame time in examples/halmark when bunnies are spawned after first 100 frames (#9854)
This commit is contained in:
1 file changed
+1
-1
@@ -885,7 +885,7 @@ impl ApplicationHandler for App {
|
||||
self.accum_time += self.last_frame_inst.elapsed().as_secs_f32();
|
||||
self.last_frame_inst = Instant::now();
|
||||
self.frame_count += 1;
|
||||
if self.frame_count == 100 && !ex.is_empty() {
|
||||
if self.frame_count >= 100 && !ex.is_empty() {
|
||||
println!(
|
||||
"Avg frame time {}ms",
|
||||
self.accum_time * 1000.0 / self.frame_count as f32
|
||||
|
||||
Reference in new issue
Block a user