📜  c# 测量执行时间 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:42.541000             🧑  作者: Mango

代码示例1
var watch = System.Diagnostics.Stopwatch.StartNew();
// the code that you want to measure comes here
watch.Stop();
var elapsedMs = watch.ElapsedMilliseconds;