C#Stopwatch用法

2021-07-11 08:07

阅读:405

标签:ogr   second   start   pwa   tar   dmi   top   str   lis   

框架:.net core2.0

class Program
{
static void Main(string[] args)
{
Fun();
}
public static void Fun() {
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
for (var i = 1; i //doSomeString
}
stopwatch.Stop();
Console.WriteLine(stopwatch.ElapsedMilliseconds);
}
}

C#Stopwatch用法

标签:ogr   second   start   pwa   tar   dmi   top   str   lis   

原文地址:https://www.cnblogs.com/hzpblogs/p/9650867.html


评论


亲,登录后才可以留言!