File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,22 +96,16 @@ int main(int argc, char *argv[])
9696
9797 /* wait for the next time we have data */
9898
99- #if 0
100- /* Debian 12 has an older standard library that cannot do this */
101- auto idle_view = readers | std::views::transform([](const auto& reader) { return reader->idle(); });
102- double idle = std::ranges::min(idle_view);
103- #else
104- double idle = 0 ;
99+ double max_idle = 0 ;
105100 for (size_t i=0 ; i<readers.size (); i++) {
106101 const auto &reader = readers[i];
107102 double reader_idle = reader->idle ();
108- idle = i ? std::min (idle , reader_idle) : reader_idle;
103+ max_idle = i ? std::max (max_idle , reader_idle) : reader_idle;
109104 }
110- #endif
111105
112- if (idle > 0 ) {
106+ if (max_idle > 0 ) {
113107 do_show_plot = true ;
114- sleep_after_seconds = idle ;
108+ sleep_after_seconds = max_idle ;
115109 }
116110
117111 if (do_show_plot && plotter.have_data ())
You can’t perform that action at this time.
0 commit comments