Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Back off overlay frame rate when all timing tests have fired (saves CPU)

Closes #225 github issue (Jay Freeman).
  • Loading branch information...
commit b127a92617b7c84859eae4b511d99852db13ae1e 1 parent 9cf87d2
Keith Winstein keithw authored
6 src/frontend/terminaloverlay.cc
@@ -285,8 +285,10 @@ int OverlayManager::wait_time( void )
285 285 next_expiry = 1000;
286 286 }
287 287
288   - if ( predictions.active() && ( next_expiry > 20 ) ) {
289   - next_expiry = 20;
  288 + if ( predictions.timing_tests_necessary()
  289 + && predictions.active()
  290 + && ( next_expiry > 50 ) ) {
  291 + next_expiry = 50;
290 292 }
291 293
292 294 return next_expiry;
5 src/frontend/terminaloverlay.h
@@ -214,6 +214,11 @@ namespace Overlay {
214 214
215 215 bool active( void ) const;
216 216
  217 + bool timing_tests_necessary( void ) const {
  218 + /* Are there any timing-based triggers that haven't fired yet? */
  219 + return !( glitch_trigger && flagging );
  220 + }
  221 +
217 222 void set_local_frame_sent( uint64_t x ) { local_frame_sent = x; }
218 223 void set_local_frame_acked( uint64_t x ) { local_frame_acked = x; }
219 224 void set_local_frame_late_acked( uint64_t x ) { local_frame_late_acked = x; }

0 comments on commit b127a92

Please sign in to comment.
Something went wrong with that request. Please try again.