Exemplo n.º 1
0
        static void Main(string[] args)
        {
            MyTimer t = new MyTimer(increment);

            t.Interval = 1000;
            string op = "";

            Console.WriteLine("Press any key to start");
            Console.ReadKey();
            do
            {
                t.star();
                Console.Clear();
                Console.WriteLine("Press any key to stop");
                Console.ReadKey();
                t.stop();
                Console.Clear();
                pintarCounter();
                Console.WriteLine("Press 1 to continue or Enter to end");
                op = Console.ReadLine();
                Console.Clear();
                pintarCounter();
            } while (op == "1");
        }