@@ -155,7 +155,7 @@ void NetManager::resetDisconnectInfo() {
155155 OSUnlockMutex (&m_mutex);
156156}
157157
158- s32 NetManager::getTimeDiff () {
158+ s32 NetManager::matchMakingElapsedSeconds () {
159159 s32 time = m_matchMakingInfos[m_currMMInfo].m_MMStartTime ;
160160
161161 // has to do u64 comparison
@@ -164,10 +164,10 @@ s32 NetManager::getTimeDiff() {
164164 }
165165
166166 OSTime currTime = OSGetTime ();
167- return ((s32)currTime - time) / OS_TIMER_CLOCK ;
167+ return OSTicksToSeconds ((s32)currTime - time);
168168}
169169
170- bool NetManager::isConnectionStateIdleOrInMM () {
170+ bool NetManager::isConnectionStateIdleOrInMM () const {
171171 bool idleOrMM = false ;
172172
173173 switch (getConnectionState ()) {
@@ -180,16 +180,13 @@ bool NetManager::isConnectionStateIdleOrInMM() {
180180 return idleOrMM;
181181}
182182
183- bool NetManager::isTaskExist () {
184- // checks if we've requested mainNetworkLoop
185- return m_taskThread->isTaskExist () ? false : true ;
186- }
183+ bool NetManager::isTaskThreadIdle () { return !m_taskThread->isTaskExist (); }
187184
188- bool NetManager::isConnectionStateIdle () {
185+ bool NetManager::isConnectionStateIdle () const {
189186 return getConnectionState () == CONNECTION_STATE_IDLE;
190187}
191188
192- bool NetManager::hasFoundMatch () {
189+ bool NetManager::hasFoundMatch () const {
193190 bool inMatch = false ;
194191
195192 bool isMyAidInMatch = (1 << m_matchMakingInfos[m_currMMInfo].m_myAid ) &
@@ -211,7 +208,7 @@ void NetManager::setConnectionState(ConnectionState connState) {
211208 m_connectionState = connState;
212209}
213210
214- NetManager::ConnectionState NetManager::getConnectionState () {
211+ NetManager::ConnectionState NetManager::getConnectionState () const {
215212 s32 code;
216213 u32 type;
217214 DWC_GetLastErrorEx (&code, &type);
0 commit comments