MdConsole/Program.cs

(完整代码) 1KB

using System;
using System.Diagnostics;

namespace MdConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            Start();
        }

       static int[] step = { 10000, 20000, 30000, 40000 };//毫秒

        public static void Start()
        {
            Stopwatch stopwatch = new Stopwatch();
            for (int i = 0; i < step.Length; i++)
            {
                stopwatch.Start();//开始计时
                Console.WriteLine($"第{i+1}次计时");
                Console.WriteLine($"当前stopWatch状态:{stopwatch.IsRunning}");
                System.Threading.Thread.Sleep(step[i]);//耗时操作
                stopwatch.Stop();//停止计时
                Console.WriteLine("停止计时");
                Console.WriteLine($"当前stopWatch状态:{stopwatch.IsRunning}");
                Console.WriteLine($"时间差:{stopwatch.Elapsed.ToString()}");
                Console.WriteLine($"毫秒数:{stopwatch.ElapsedMilliseconds}");
                Console.WriteLine("========================================");
                stopwatch.Reset();
            }
            Console.ReadLine();
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。