Fix for issue 15, use the new display.time_to_refresh #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fairly minimal set of changes to switch the timeout value from the old value (hardcoded to be 120, or 2 minutes) to the newer "display.time_to_refresh" which is set to be 180 (3 minutes).
I don't just wait the exact amount of time. My experience with other operating systems is that "sleep" times are often modified: the OS might choose to wake either earlier or later. Later isn't a problem, but earlier is a very bad: presumably the developer is about to call refresh() and that will throw if the time is a little early. Since we have to wait for 180 seconds anyway, five extra seconds shouldn't be a deal breaker.
I also updated the code to have an infinite loop at the end -- otherwise the code will fully exit and the display might be reset (I've seen the display reset several times while doing my testing).