System.Diagnostics.Stopwatch
http://blog.csdn.net/sky_zt/article/details/5950932
#if DEBUG
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
sw.Start();
#endif
/////////////////////==============中间各种程序====================//////////////
#if DEBUG
sw.Stop();
TimeSpan ts = sw.Elapsed;
string elapsedTime = String.Format(fac + ":{0:00}:{1:00}:{2:00}.{3:00}<br />", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10);
//Response.Write(elapsedTime);
#endif
Any fool can write code that a computer can understand. Good programmers write code that humans can understand. –Martin Fowler
作者:『Gerry Ge』
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接,否则保留追究法律责任的权利。