aboutsummaryrefslogtreecommitdiffstats
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-05-20 02:05:08 +0100
committerGravatar Sadie Powell2023-05-20 02:09:49 +0100
commitd9855d6747ef8dfa8d51f4d5368ef15ed37c20d9 (patch)
treef205a6511e48c96c156a3d7319433192a911c5cc /src/inspircd.cpp
parentFix some minor Doxygen issues. (diff)
downloadinspircd++-d9855d6747ef8dfa8d51f4d5368ef15ed37c20d9.tar.gz
inspircd++-d9855d6747ef8dfa8d51f4d5368ef15ed37c20d9.tar.bz2
inspircd++-d9855d6747ef8dfa8d51f4d5368ef15ed37c20d9.zip
Add an undocumented build option for unlimiting the main loop.
This should never be used normally but is useful for irctest.
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 9daeeb476..5e4a05581 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -664,12 +664,13 @@ void InspIRCd::Run()
UpdateTime();
- /* Run background module timers every few seconds
- * (the docs say modules should not rely on accurate
- * timing using this event, so we dont have to
- * time this exactly).
- */
+ // Normally we want to limit the mainloop to processing data
+ // once a second but this can cause problems with testing
+ // software like irctest. Don't define this unless you know
+ // what you are doing.
+#ifndef INSPIRCD_UNLIMITED_MAINLOOP
if (TIME.tv_sec != OLDTIME)
+#endif
{
CollectStats();
CheckTimeSkip(OLDTIME, TIME.tv_sec);