mirror of
https://github.com/nzbget/nzbget.git
synced 2026-08-07 07:52:06 -04:00
#351: sleep longer in curses frontend
This reduces CPU usage, especially in idle.
This commit is contained in:
1 parent
3a5bc85962
commit
82dfec471b
1 file changed
+4
-2
@@ -213,8 +213,10 @@ void NCursesFrontend::Run()
|
||||
m_dataUpdatePos = m_updateInterval;
|
||||
}
|
||||
|
||||
Util::Sleep(10);
|
||||
m_dataUpdatePos -= 10;
|
||||
// update more often (sleep shorter) if need faster reaction on user input
|
||||
int sleepInterval = m_inputMode == normal ? 100 : 10;
|
||||
Util::Sleep(sleepInterval);
|
||||
m_dataUpdatePos -= sleepInterval;
|
||||
}
|
||||
|
||||
FreeData();
|
||||
|
||||
Reference in new issue
Block a user