Skip to content

How to dynamically set the refresh interval ? #1446

Answered by senorprogrammer
doctorfree asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, I get it now. No, unfortunately there isn't a way to dynamically change the refreshInterval after the app launches, because it's all set here https://github.com/wtfutil/wtf/blob/4d526621e61722a5d2b955bba074e6db6422ebdf/app/scheduler.go on start-up.

But that's got me thinking that it would be cool to be able to do that with a module. In fact, a module could support:

  • module.PauseRefresh()
  • module.ResumeRefresh()
  • module.GetRefreshInterval()
  • module.SetRefreshInterval(interval)
  • module.RestoreRefreshInterval()

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by doctorfree
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants