From ecace9a36d98e505f3c42cd66413b9614afb2eb0 Mon Sep 17 00:00:00 2001 From: AlexeyAB84 Date: Thu, 7 Jul 2022 23:33:45 +0300 Subject: [PATCH] minor fix --- src/demo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/demo.c b/src/demo.c index 0c403335..2c48bb78 100644 --- a/src/demo.c +++ b/src/demo.c @@ -344,12 +344,12 @@ void demo(char *cfgfile, char *weightfile, float thresh, float hier_thresh, int } while (custom_atomic_load_int(&run_detect_in_thread)) { - if(avg_fps > 180) this_thread_yield(); + if(avg_fps > 50) this_thread_yield(); else this_thread_sleep_for(thread_wait_ms); // custom_join(detect_thread, 0); } if (!benchmark) { while (custom_atomic_load_int(&run_fetch_in_thread)) { - if (avg_fps > 180) this_thread_yield(); + if (avg_fps > 50) this_thread_yield(); else this_thread_sleep_for(thread_wait_ms); // custom_join(fetch_thread, 0); } free_image(det_s);