1、
System.Diagnostics.Stopwatch watch=new Stopwatch();
watch.Start();
..........
..........
watch.Stop();
watch.Elapsed;
2、
DateTime oldTime=DateTime.Now;
........
........
TimeSpan ts=DateTime.Now.Subtract(oldTime);
(ts.TotalMinutes*60000).ToString();//毫秒
|
请发表评论