Exemple #1
0
 void Run()
 {
     while (running)
     {
         var now = DateTime.Now.Ticks;
         try
         {
             Recive();
         }
         catch (Exception ex)
         {
             UnityEngine.Debug.Log(ex.StackTrace);
         }
         long t = DateTime.Now.Ticks;
         t -= now;
         t /= 10000;
         if (t < 10)
         {
             ThreadEx.Sleep(1);
         }
     }
 }