Exemplo n.º 1
0
        public void Run()
        {
            Console.WriteLine("StopWatchTest"); // Prompt
            var stopwatch = new Stopwatch();
            Console.WriteLine("Start stopwatch"); // Prompt
            stopwatch.StartNew();

            Console.WriteLine("Start long process"); // Prompt
            Thread.Sleep(3000);
            Console.WriteLine("Passed {0}", stopwatch.TimePassed()); // Prompt

            Console.WriteLine("Stop stopwatch"); // Prompt
            stopwatch.Stop();
            Console.ReadKey();
        }