Beispiel #1
0
   static void checkGameTimeouts()
   {
      // Look for people who have been connected longer than the threshold and
      // disconnect them.

      U32 currentTime = Platform::getRealMilliseconds();
      for(GameConnection *walk = gClientList.mNext; walk != &gClientList; walk = walk->mNext)
      {
         if(currentTime - walk->mCreateTime > 15000)
         {
            walk->disconnect("You're done!");
            break;
         }
      }
   }