Make ZNC faster in the integration test.

This is not appropriate for normal usage.
This commit is contained in:
Alexey Sokolov
2016-10-04 01:19:34 +01:00
parent 87ca820bda
commit ac0048cc01
2 changed files with 7 additions and 0 deletions

View File

@@ -104,6 +104,12 @@ CTimer::CTimer(CModule* pModule, unsigned int uInterval, unsigned int uCycles,
: CCron(), m_pModule(pModule), m_sDescription(sDescription) {
SetName(sLabel);
// Make integration test faster
char* szDebugTimer = getenv("ZNC_DEBUG_TIMER");
if (szDebugTimer && *szDebugTimer == '1') {
uInterval = std::max(1u, uInterval / 4u);
}
if (uCycles) {
StartMaxCycles(uInterval, uCycles);
} else {