From 3b5d9b7392ddb154de7883be5f6b42290a4179a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 14 Sep 2020 16:47:27 +0300 Subject: [PATCH] examples: Update for glib API changes Timeouts now use std::time::Duration instead of plain integers. --- utils/fallbackswitch/examples/gtk_fallbackswitch.rs | 2 +- utils/togglerecord/examples/gtk_recording.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/fallbackswitch/examples/gtk_fallbackswitch.rs b/utils/fallbackswitch/examples/gtk_fallbackswitch.rs index bb839a3a..c066729a 100644 --- a/utils/fallbackswitch/examples/gtk_fallbackswitch.rs +++ b/utils/fallbackswitch/examples/gtk_fallbackswitch.rs @@ -126,7 +126,7 @@ fn create_ui(app: >k::Application) { app.add_window(&window); let video_sink_weak = video_sink.downgrade(); - let timeout_id = glib::timeout_add_local(100, move || { + let timeout_id = glib::timeout_add_local(std::time::Duration::from_millis(100), move || { let video_sink = match video_sink_weak.upgrade() { Some(video_sink) => video_sink, None => return glib::Continue(true), diff --git a/utils/togglerecord/examples/gtk_recording.rs b/utils/togglerecord/examples/gtk_recording.rs index 78ab9f45..6e68e17b 100644 --- a/utils/togglerecord/examples/gtk_recording.rs +++ b/utils/togglerecord/examples/gtk_recording.rs @@ -232,7 +232,7 @@ fn create_ui(app: >k::Application) { let video_sink_weak = video_sink.downgrade(); let togglerecord_weak = togglerecord.downgrade(); - let timeout_id = glib::timeout_add_local(100, move || { + let timeout_id = glib::timeout_add_local(std::time::Duration::from_millis(100), move || { let video_sink = match video_sink_weak.upgrade() { Some(video_sink) => video_sink, None => return glib::Continue(true),