美文网首页
C#测试程序运行时间

C#测试程序运行时间

作者: 一飞同学丶走慢点 | 来源:发表于2019-10-12 10:35 被阅读0次
System.Diagnostics.Stopwatch t1 
= new System.Diagnostics.Stopwatch();
t1.Start();
SetupUIEvents();
t1.Stop();
Debug.LogWarning($"t1=总运行时间{t1.Elapsed}:总运行时间(毫秒单位){t1.ElapsedMilliseconds}:计时器刻度{t1.ElapsedTicks}");

总体来说ElapsedTicks更为精确

相关文章

网友评论

      本文标题:C#测试程序运行时间

      本文链接:https://www.haomeiwen.com/subject/rctqmctx.html