Skip to content

Instantly share code, notes, and snippets.

@BlockDMask
Created September 23, 2022 23:43
using System;
using System.Diagnostics; // 필요함.
class Program
{
public static void Main()
{
Stopwatch sw = new Stopwatch(); // 스탑워치 전용 인스턴스 생성
Console.WriteLine("Start...!!");
sw.Start(); // 시간 측정 시작
Thread.Sleep(2200); // 2.2sec 대기
Console.WriteLine("Wait...");
sw.Stop(); // 시간 측정 끝
Console.WriteLine($"Time : {sw.ElapsedMilliseconds}ms"); //
}
}
@BlockDMask
Copy link
Author

csharp_stopwatch_1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment