gpt4 book ai didi

c# - Stopwatch.ElapsedMilliseconds 和 (stopDateTime - startDateTime).TotalMilliseconds 之间的区别

转载 作者:行者123 更新时间:2023-11-30 13:40:28 25 4
gpt4 key购买 nike

<分区>

我有:

Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();

DateTime start = DateTime.Now;
Thread.Sleep(5000);

stopWatch.Stop();
DateTime stop = DateTime.Now;

//stopWatch.ElapsedMilliseconds approximately equals to (stop - start).TotalMilliseconds

那么这些测量方法有区别吗?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com