C# 耗时记录
记录程序的运行耗时时间
System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();
watch.Start();
//Code
watch.Stop();
var mSeconds = watch.ElapsedMilliseconds;
Dialog.Write("耗时:" + mSeconds.ToString());
记录程序的运行耗时时间
System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();
watch.Start();
//Code
watch.Stop();
var mSeconds = watch.ElapsedMilliseconds;
Dialog.Write("耗时:" + mSeconds.ToString());