Skip to content

Commit

Permalink
Refactor timing/sleep handling in the scheduler.
Browse files Browse the repository at this point in the history
The first main change is to use HandleRecordiing() and HandleTuning()
to set the sleep time.  The previous code used mostly duplicate code
in CalcTimeToNextHandleRecordingEvent().  That meant there were two
places that needed to be checked/kept in sync when analyzing/fixing
timing issues.

The next main change is to sleep as long as possible.  The previous
code would never sleep for longer than 60 seconds, even if it had
nothing to do.

The last main change is to be more persistent in tyring to apply long
preroll when the tuner is initially busy.  The previous code didn't
specifically try to do this and it was hit and miss whether or not
preroll was used in these situations.

The rest is various stylistic changes.

Fixes #11108
  • Loading branch information
gigem committed Jun 4, 2013
1 parent f455e49 commit a2eb931
Show file tree
Hide file tree
Showing 2 changed files with 151 additions and 185 deletions.
Loading

0 comments on commit a2eb931

Please sign in to comment.