From a94396b3273f3d9e18549fb977a4a89b6ce86e51 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 16 Mar 2007 18:19:22 +0000 Subject: Wtf, ive found the source of the drift, it adds the old delta to the new! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6685 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 2 +- src/modules/m_spanningtree/timesynctimer.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 4b2690c49..af2672102 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -938,7 +938,7 @@ time_t InspIRCd::Time(bool delta) int InspIRCd::SetTimeDelta(int delta) { int old = time_delta; - time_delta += delta; + time_delta = delta; this->Log(DEBUG, "Time delta set to %d (was %d)", time_delta, old); return old; } diff --git a/src/modules/m_spanningtree/timesynctimer.cpp b/src/modules/m_spanningtree/timesynctimer.cpp index f374f9ac9..8efaf7d64 100644 --- a/src/modules/m_spanningtree/timesynctimer.cpp +++ b/src/modules/m_spanningtree/timesynctimer.cpp @@ -19,12 +19,13 @@ /* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ -TimeSyncTimer::TimeSyncTimer(InspIRCd *Inst, ModuleSpanningTree *Mod) : InspTimer(3600, Inst->Time(), true), Instance(Inst), Module(Mod) +TimeSyncTimer::TimeSyncTimer(InspIRCd *Inst, ModuleSpanningTree *Mod) : InspTimer(10, Inst->Time(), true), Instance(Inst), Module(Mod) { } void TimeSyncTimer::Tick(time_t TIME) { Module->BroadcastTimeSync(); + Instance->Log(DEBUG,"TICK!"); } -- cgit v1.2.3