摘要:
在工作学习中,经常会遇到计算程序运行时间问题,下面介绍2中常用的方法计算程序运行时间。一、StopWatch 1 static void Main(string[] args) 2 { 3 //定义一个StopWatch对象 4 System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch(); 5 // 开始计时 6 timer.Start(); 7 for (int i = 0; i < 10 * 1000 * 1000; i++) 8 { 9 C... 阅读全文
posted @ 2012-10-17 22:59
Frank.Fan
阅读(352)
评论(0)
推荐(0)
浙公网安备 33010602011771号