irontec / sngrep

Ncurses SIP Messages flow viewer
GNU General Public License v3.0
1k stars 189 forks source link

question: autoscroll related #497

Closed alzrck closed 2 weeks ago

alzrck commented 3 weeks ago

Hello, quick question, when autoscroll is enabled, how fast/often the screen is refreshed?

thanks

Kaian commented 2 weeks ago

Hi @alzrck

Interface is refreshed every time a key is pressed or every 200 ms if no key has been pressed

https://github.com/irontec/sngrep/blob/6ee2c9ca551508d620d9bf1d02bcff231da00455/src/curses/ui_manager.h#L46-L47 https://github.com/irontec/sngrep/blob/6ee2c9ca551508d620d9bf1d02bcff231da00455/src/curses/ui_manager.c#L204-L205

The halfdelay routine is used for half-delay mode, which is similar to cbreak mode in that characters typed by the user are immediately available to the program. However, after blocking for tenths tenths of seconds, ERR is returned if nothing has been typed. The value of tenths must be a number between 1 and 255. Use nocbreak to leave half-delay mode.

Best regards!

alzrck commented 2 weeks ago

Thanks for the prompt and detailed answer, I'll take a deep read on this.

Regards