1 var stopwatch = Stopwatch.StartNew(); 2 Thread.Sleep(1000); 3 Console.WriteLine($"Elapsed time:{stopwatch.Elapsed}");