C#计时器 Stopwatch 使用demo
Stopwatch st = new Stopwatch(); st.Start(); for(int i =0; i<100000; i++) { console.writeLine('输出'); } st.Stop(); TimeSpan ts = st.Elapsed; BaseHelper.WriteLogs("经办流程列表", String.Format("共计{0}人,耗时{1}ms,{2}分钟:", allUser.Count() + "", ts.TotalMilliseconds + "", ts.TotalMinutes + ""));
本文来自博客园,作者:WantRemake,转载请注明原文链接:https://www.cnblogs.com/SmallChen/p/16787589.html