コード例 #1
0
 private static void DelayApiIfRequired(string apiName)
 {
     if (RegistryParameters.IsApiLatencyTestEnabled)
     {
         int num = 0;
         while (!AmSystemManager.Instance.IsShutdown)
         {
             int apiLatencyInSec = RegistryParameters.GetApiLatencyInSec(apiName);
             if (num >= apiLatencyInSec)
             {
                 break;
             }
             Thread.Sleep(1000);
             num++;
         }
     }
 }