Ejemplo n.º 1
0
        public void test001()
        {
            var executionTime = Startwatch.StartNew();

            /* execute interesting code here */
            System.Threading.Thread.Sleep(new System.Random().Next(10, 20));

            executionTime.Stop();

            Console.WriteLine("Total Ticks {0}", executionTime.ElapsedTicks);
            Console.WriteLine("Total Milliseconds {0}", executionTime.ElapsedMilliseconds);
            Console.WriteLine("Total Timespan {0}", (TimeSpan)executionTime.Elapsed);
            Console.WriteLine("Start Time {0}", (DateTime?)executionTime.StartTime);
            Console.WriteLine("End Time {0}", (DateTime?)executionTime.EndTime);
        }