2011年8月27日
摘要: 在需要对程序的执行时间进行精准测试的程序员,不妨使用.Net提供的Stopwatch类,它的命名空间是:System.Diagnostics代码如下:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Diagnostics;namespaceStopWatch{classProgram{staticvoidMain(string[]args){Stopwatchsw=newStopwatch();sw.Start();//这里填写要执行的代码sw.Stop();Co 阅读全文
posted @ 2011-08-27 20:10 小小池 阅读(187) 评论(0) 推荐(0) 编辑
摘要: use kfc --数据库declare @date1 datetimedeclare @date2 datetimeselect @date1=getdate()--测试语句select * from test where myname ='123'select @date2=getdate()--结果是毫秒数select datediff(millisecond, @date1, @date2) 阅读全文
posted @ 2011-08-27 19:19 小小池 阅读(200) 评论(0) 推荐(0) 编辑