diff --git a/examples/src/bin/gtksink.rs b/examples/src/bin/gtksink.rs index 36414b2df..5d6122fca 100644 --- a/examples/src/bin/gtksink.rs +++ b/examples/src/bin/gtksink.rs @@ -84,7 +84,7 @@ fn create_ui(app: >k::Application) { // the underlying pipeline, and display it in our gui. // Since this closure is called by the mainloop thread, we are allowed // to modify the gui widgets here. - let timeout_id = glib::timeout_add_local(500, move || { + let timeout_id = glib::timeout_add_local(std::time::Duration::from_millis(500), move || { // Here we temporarily retrieve a strong reference on the pipeline from the weak one // we moved into this callback. let pipeline = match pipeline_weak.upgrade() { diff --git a/examples/src/bin/gtkvideooverlay.rs b/examples/src/bin/gtkvideooverlay.rs index e42936d14..999a2e6c3 100644 --- a/examples/src/bin/gtkvideooverlay.rs +++ b/examples/src/bin/gtkvideooverlay.rs @@ -195,7 +195,7 @@ fn create_ui(app: >k::Application) { // the underlying pipeline, and display it in our gui. // Since this closure is called by the mainloop thread, we are allowed // to modify the gui widgets here. - let timeout_id = glib::timeout_add_local(500, move || { + let timeout_id = glib::timeout_add_local(std::time::Duration::from_millis(500), move || { // Here we temporarily retrieve a strong reference on the pipeline from the weak one // we moved into this callback. let pipeline = match pipeline_weak.upgrade() {