diff --git a/server/gameserver/matchpool.cc b/server/gameserver/matchpool.cc index 34154ba6..0208d998 100644 --- a/server/gameserver/matchpool.cc +++ b/server/gameserver/matchpool.cc @@ -9,6 +9,19 @@ void MatchPool::Init() { + a8::Timer::Instance()->AddRepeatTimerAndAttach + (1000, + a8::XParams() + .SetSender(this), + [] (const a8::XParams& param) + { + MatchPool::Instance()->Update(); + }, + &timer_attacher_.timer_list_, + [] (const a8::XParams& param) + { + } + ); } void MatchPool::UnInit() @@ -64,3 +77,8 @@ void MatchPool::RemoveSocket(int socket_handle) socket_hash_.erase(itr); } } + +void MatchPool::Update() +{ + +} diff --git a/server/gameserver/matchpool.h b/server/gameserver/matchpool.h index d9f923c1..895ca979 100644 --- a/server/gameserver/matchpool.h +++ b/server/gameserver/matchpool.h @@ -27,6 +27,7 @@ private: std::tuple* GetMatchInfo(int socket_handle); void RemoveTeam(const std::string& team_uuid); void RemoveSocket(int socket_handle); + void Update(); private: a8::TimerAttacher timer_attacher_;