Skip to content

Commit a60654f

Browse files
committed
change update to 2hz
1 parent 63c68aa commit a60654f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/local_video/src/subscriber.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ struct VideoApp {
440440
ctrl_c_received: Arc<AtomicBool>,
441441
locked_aspect: Option<f32>,
442442
display_timestamp: bool,
443-
/// Cached latency string, updated at ~5 Hz so it's readable.
443+
/// Cached latency string, updated at ~2 Hz so it's readable.
444444
latency_display: String,
445445
/// Last time the latency display was refreshed.
446446
latency_last_update: Instant,
@@ -551,8 +551,8 @@ impl eframe::App for VideoApp {
551551
.show(ctx, |ui| {
552552
let now_us = current_timestamp_us();
553553

554-
// Update the cached latency display at ~5 Hz so it's readable.
555-
if self.latency_last_update.elapsed() >= Duration::from_millis(200) {
554+
// Update the cached latency display at ~2 Hz so it's readable.
555+
if self.latency_last_update.elapsed() >= Duration::from_millis(500) {
556556
let delta_ms = (now_us - user_ts) as f64 / 1000.0;
557557
self.latency_display = format!("{:.1}ms", delta_ms);
558558
self.latency_last_update = Instant::now();

0 commit comments

Comments
 (0)