Exemplo n.º 1
0
 internal static void StartMetering()
 {
     if (TaskMeter._StopWatch != null)
     {
         throw new Exception("Taskometer: can not start measure twice");
     }
     TaskMeter._StopWatch = new System.Diagnostics.Stopwatch();
     TaskMeter._StopWatch.Start();
     scenario.Begin(count, "Taskometer Measurement Begin");
     total.Start();
 }
        public void ParallelSleepTest()
        {
            prologue.Start();
            System.Threading.Thread.Sleep(10);
            prologue.End();

            parloop.Start();
            System.Threading.Tasks.Parallel.For(0, 50, i =>
            {
                partask.Start();
                System.Threading.Thread.Sleep(5);
                partask.End();
            });
            parloop.End();

            epilogue.Start();
            System.Threading.Thread.Sleep(10);
            epilogue.End();
        }