summaryrefslogtreecommitdiff
path: root/src/socketengines
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-18 19:36:41 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-18 19:36:41 +0000
commit7e46119759b7099c38f543bd38d0186b9806542f (patch)
treeb31264c454e26566b2e70c2794b89d77f4e28c44 /src/socketengines
parent42592c0083505777e8fb8e4bf09182528229a787 (diff)
Remove excessive gettimeofday system calls
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12293 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengines')
-rw-r--r--src/socketengines/socketengine_epoll.cpp1
-rw-r--r--src/socketengines/socketengine_kqueue.cpp1
-rw-r--r--src/socketengines/socketengine_poll.cpp1
-rw-r--r--src/socketengines/socketengine_ports.cpp1
-rw-r--r--src/socketengines/socketengine_select.cpp1
5 files changed, 5 insertions, 0 deletions
diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp
index 11fa72072..96c3922f9 100644
--- a/src/socketengines/socketengine_epoll.cpp
+++ b/src/socketengines/socketengine_epoll.cpp
@@ -187,6 +187,7 @@ int EPollEngine::DispatchEvents()
socklen_t codesize = sizeof(int);
int errcode;
int i = epoll_wait(EngineHandle, events, GetMaxFds() - 1, 1000);
+ ServerInstance->UpdateTime();
TotalEvents += i;
diff --git a/src/socketengines/socketengine_kqueue.cpp b/src/socketengines/socketengine_kqueue.cpp
index ca909ce3e..e7d7e4283 100644
--- a/src/socketengines/socketengine_kqueue.cpp
+++ b/src/socketengines/socketengine_kqueue.cpp
@@ -217,6 +217,7 @@ int KQueueEngine::DispatchEvents()
ts.tv_sec = 1;
int i = kevent(EngineHandle, NULL, 0, &ke_list[0], GetMaxFds(), &ts);
+ ServerInstance->UpdateTime();
TotalEvents += i;
diff --git a/src/socketengines/socketengine_poll.cpp b/src/socketengines/socketengine_poll.cpp
index f30cd1fed..93463aea7 100644
--- a/src/socketengines/socketengine_poll.cpp
+++ b/src/socketengines/socketengine_poll.cpp
@@ -235,6 +235,7 @@ int PollEngine::DispatchEvents()
socklen_t codesize = sizeof(int);
int errcode;
int processed = 0;
+ ServerInstance->UpdateTime();
if (i > 0)
{
diff --git a/src/socketengines/socketengine_ports.cpp b/src/socketengines/socketengine_ports.cpp
index 43d958173..23a3c3a45 100644
--- a/src/socketengines/socketengine_ports.cpp
+++ b/src/socketengines/socketengine_ports.cpp
@@ -167,6 +167,7 @@ int PortsEngine::DispatchEvents()
unsigned int nget = 1; // used to denote a retrieve request.
int i = port_getn(EngineHandle, this->events, GetMaxFds() - 1, &nget, &poll_time);
+ ServerInstance->UpdateTime();
// first handle an error condition
if (i == -1)
diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp
index 7bff4ff6d..795e844e6 100644
--- a/src/socketengines/socketengine_select.cpp
+++ b/src/socketengines/socketengine_select.cpp
@@ -119,6 +119,7 @@ int SelectEngine::DispatchEvents()
tval.tv_usec = 0;
sresult = select(FD_SETSIZE, &rfdset, &wfdset, &errfdset, &tval);
+ ServerInstance->UpdateTime();
/* Nothing to process this time around */
if (sresult < 1)