Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Stopwatch stopwatch = new Stopwatch();
            using(var timeBlock = new TimeMeasurementBlock(stopwatch))
            {
                for(int i = 0; i < 300000; i++)
                {
                    IsPrime(i);
                }

                Console.WriteLine(timeBlock.Stopwatch.ElapsedMilliseconds);
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Stopwatch stopwatch = new Stopwatch();

            using (var timeBlock = new TimeMeasurementBlock(stopwatch))
            {
                for (int i = 0; i < 300000; i++)
                {
                    IsPrime(i);
                }

                Console.WriteLine(timeBlock.Stopwatch.ElapsedMilliseconds);
            }
        }