Open divan opened 6 years ago
Hi @divan , I am looking into this enhancement and wondering if this could be done by passing command line arguments when running it, if no arguments then take default 1 second, or also through config file ? What do you think?
Hey, sure, there is already a command line flag for that, (-i
for interval
), it just doesn't work for now.
Currently, the polling interval is set to 1 second. It's a default for the https://github.com/gizak/termui library, and it seems like there is no easy way to change it. Obvious way should be to change
ui.AddTimer()
's parameters, but it doesn't work because the timer is instantiated intermui
library and hardcoded for 1s.Need to investigate how to allow custom timers. I'm particularly interested in resolutions in range 100ms - 5s.
Note: by simply changing
ui.AddTimer()
's parameter to 100ms and changingtermui
's render.go with/timer/1s
->/timer/100ms
works perfectly