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