- timer_out_of_range++;
- }
-
- /* check timing roughly every second */
-
- if ((timer_callbacks % minimum_redraw_rate) == 0) {
- std::cerr << "OOR check: " << timer_out_of_range << std::endl;
- if (timer_out_of_range > (minimum_redraw_rate / 4)) {
- /* more than 25 % of the last second's worth of timers
- have been late. Take action.
- */
- block_plugin_redraws = block_plugin_redraw_count;
- std::cerr << "Timer too slow, block plugin redraws\n";
- }
- timer_out_of_range = 0;
+ block_plugin_redraws = block_plugin_redraw_count;
+ timer_connection.disconnect ();
+ timer_connection = Glib::signal_timeout().connect (&AUPluginUI::timer_callback, 40);
+#ifdef AU_DEBUG_PRINT
+ std::cerr << "Timer too slow, block plugin redraws\n";
+#endif