summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-07-10 12:17:55 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-07-10 12:17:55 +0200
commitacccaa39641500b8a691db4136e6571102a438ed (patch)
tree5faed16f0fc7ac11566d6df19561abd3c3ad8c43 /src
parent8186e0b091a4f487448dcfab7144217a85870d4c (diff)
Remove current time parameter of the Timer constructor
Diffstat (limited to 'src')
-rw-r--r--src/coremods/core_dns.cpp2
-rw-r--r--src/inspsocket.cpp2
-rw-r--r--src/modules/extra/m_pgsql.cpp2
-rw-r--r--src/modules/m_conn_join.cpp2
-rw-r--r--src/modules/m_spanningtree/resolvers.cpp2
-rw-r--r--src/timer.cpp4
6 files changed, 7 insertions, 7 deletions
diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp
index 17e489794..f6a1da8c9 100644
--- a/src/coremods/core_dns.cpp
+++ b/src/coremods/core_dns.cpp
@@ -444,7 +444,7 @@ class MyManager : public Manager, public Timer, public EventHandler
public:
DNS::Request* requests[MAX_REQUEST_ID];
- MyManager(Module* c) : Manager(c), Timer(3600, ServerInstance->Time(), true)
+ MyManager(Module* c) : Manager(c), Timer(3600, true)
{
for (int i = 0; i < MAX_REQUEST_ID; ++i)
requests[i] = NULL;
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index eb59bf4f1..494422075 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -107,7 +107,7 @@ BufferedSocketError BufferedSocket::BeginConnect(const irc::sockets::sockaddrs&
if (!SocketEngine::AddFd(this, FD_WANT_NO_READ | FD_WANT_SINGLE_WRITE | FD_WRITE_WILL_BLOCK))
return I_ERR_NOMOREFDS;
- this->Timeout = new SocketTimeout(this->GetFd(), this, timeout, ServerInstance->Time());
+ this->Timeout = new SocketTimeout(this->GetFd(), this, timeout);
ServerInstance->Timers.AddTimer(this->Timeout);
ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "BufferedSocket::DoConnect success");
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 1f7d7c450..b89633ede 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -57,7 +57,7 @@ class ReconnectTimer : public Timer
private:
ModulePgSQL* mod;
public:
- ReconnectTimer(ModulePgSQL* m) : Timer(5, ServerInstance->Time(), false), mod(m)
+ ReconnectTimer(ModulePgSQL* m) : Timer(5, false), mod(m)
{
}
bool Tick(time_t TIME);
diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp
index 631e5945c..d5a095e7f 100644
--- a/src/modules/m_conn_join.cpp
+++ b/src/modules/m_conn_join.cpp
@@ -43,7 +43,7 @@ class JoinTimer : public Timer
public:
JoinTimer(LocalUser* u, SimpleExtItem<JoinTimer>& ex, const std::string& chans, unsigned int delay)
- : Timer(delay, ServerInstance->Time(), false)
+ : Timer(delay, false)
, user(u), channels(chans), ext(ex)
{
ServerInstance->Timers.AddTimer(this);
diff --git a/src/modules/m_spanningtree/resolvers.cpp b/src/modules/m_spanningtree/resolvers.cpp
index 80e8aeb0e..3d04a5085 100644
--- a/src/modules/m_spanningtree/resolvers.cpp
+++ b/src/modules/m_spanningtree/resolvers.cpp
@@ -128,7 +128,7 @@ void SecurityIPResolver::OnError(const DNS::Query *r)
}
CacheRefreshTimer::CacheRefreshTimer()
- : Timer(3600, ServerInstance->Time(), true)
+ : Timer(3600, true)
{
}
diff --git a/src/timer.cpp b/src/timer.cpp
index 4fee71742..0b0d8bac3 100644
--- a/src/timer.cpp
+++ b/src/timer.cpp
@@ -30,8 +30,8 @@ void Timer::SetInterval(time_t newinterval)
ServerInstance->Timers.AddTimer(this);
}
-Timer::Timer(unsigned int secs_from_now, time_t now, bool repeating)
- : trigger(now + secs_from_now)
+Timer::Timer(unsigned int secs_from_now, bool repeating)
+ : trigger(ServerInstance->Time() + secs_from_now)
, secs(secs_from_now)
, repeat(repeating)
{