diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-18 19:36:41 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-18 19:36:41 +0000 |
commit | 7e46119759b7099c38f543bd38d0186b9806542f (patch) | |
tree | b31264c454e26566b2e70c2794b89d77f4e28c44 /src/userprocess.cpp | |
parent | 42592c0083505777e8fb8e4bf09182528229a787 (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/userprocess.cpp')
-rw-r--r-- | src/userprocess.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp index 75cd8634a..ee9c75bc0 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -68,7 +68,7 @@ void InspIRCd::DoBackgroundUserStuff() switch (curr->registered) { case REG_ALL: - if (TIME > curr->nping) + if (Time() > curr->nping) { // This user didn't answer the last ping, remove them if (!curr->lastping) @@ -77,14 +77,14 @@ void InspIRCd::DoBackgroundUserStuff() char message[MAXBUF]; snprintf(message, MAXBUF, "Ping timeout: %ld second%s", (long)time, time > 1 ? "s" : ""); curr->lastping = 1; - curr->nping = TIME + curr->MyClass->GetPingTime(); + curr->nping = Time() + curr->MyClass->GetPingTime(); this->Users->QuitUser(curr, message); continue; } curr->Write("PING :%s",this->Config->ServerName.c_str()); curr->lastping = 0; - curr->nping = TIME +curr->MyClass->GetPingTime(); + curr->nping = Time() +curr->MyClass->GetPingTime(); } break; case REG_NICKUSER: @@ -97,7 +97,7 @@ void InspIRCd::DoBackgroundUserStuff() break; } - if (curr->registered != REG_ALL && (TIME > (curr->age + curr->MyClass->GetRegTimeout()))) + if (curr->registered != REG_ALL && (Time() > (curr->age + curr->MyClass->GetRegTimeout()))) { /* * registration timeout -- didnt send USER/NICK/HOST |