环境:net framework 4.5.2 using System.Diagnostics;Stopwatch st = new Stopwatch();//重置st.Reset();//开始st.Start();//停止st.Stop();//转毫秒Console.WriteLine(st.ElapsedMilliseconds.ToString() + " ms");