Beispiel #1
0
        static void Main(string[] args)
        {
            var stopwatch = new StopWatch();

            for (var i = 0; i < 2; i++)
            {
                stopwatch.StartRunning();
                Thread.Sleep(1000);
                stopwatch.StopRunning();

                Console.WriteLine("Duration: " + stopwatch.GetDuration());
                Console.WriteLine("Press ENTER if you'd like to run the stop watch for a second time.");
                Console.ReadLine();
            }
        }