We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd53ea9 commit a827c18Copy full SHA for a827c18
examples/common/src/framework.rs
@@ -342,11 +342,11 @@ impl FrameCounter {
342
fn update(&mut self) {
343
self.frame_count += 1;
344
let new_instant = web_time::Instant::now();
345
- let elasped_secs = (new_instant - self.last_printed_instant).as_secs_f32();
346
- if elasped_secs > 1.0 {
347
- let elapsed_ms = elasped_secs * 1000.0;
+ let elapsed_secs = (new_instant - self.last_printed_instant).as_secs_f32();
+ if elapsed_secs > 1.0 {
+ let elapsed_ms = elapsed_secs * 1000.0;
348
let frame_time = elapsed_ms / self.frame_count as f32;
349
- let fps = self.frame_count as f32 / elasped_secs;
+ let fps = self.frame_count as f32 / elapsed_secs;
350
log::info!("Frame time {:.2}ms ({:.1} FPS)", frame_time, fps);
351
352
self.last_printed_instant = new_instant;
0 commit comments