Exemplo n.º 1
0
 //结束计时
 public void Stop()
 {
     if (UnixHelper.OS == "windows")
     {
         QueryPerformanceCounter(out stopTime);
     }
     else
     {
         UnixHelper.QueryPerformanceCounter(out stopTime);
     }
 }
Exemplo n.º 2
0
 //开始计时
 public void Start()
 {
     //让等待线程工作
     System.Threading.Thread.Sleep(0);
     if (UnixHelper.OS == "windows")
     {
         QueryPerformanceCounter(out startTime);
     }
     else
     {
         UnixHelper.QueryPerformanceCounter(out startTime);
     }
 }