Пример #1
0
 /// <summary>
 /// Execute this benchmark.
 /// </summary>
 public virtual void Execute()
 {
     lock (this)
     {
         if (executed)
         {
             throw new InvalidOperationException("Benchmark was already executed");
         }
         executed = true;
         runData.SetStartTimeMillis();
         algorithm.Execute();
     }
 }
Пример #2
0
 /// <summary>
 /// Execute this benchmark.
 /// </summary>
 public virtual void Execute()
 {
     lock (this)
     {
         if (executed)
         {
             throw IllegalStateException.Create("Benchmark was already executed");
         }
         executed = true;
         runData.SetStartTimeMillis();
         algorithm.Execute();
     }
 }
Пример #3
0
 /// <summary>
 /// Execute this benchmark.
 /// </summary>
 public virtual void Execute()
 {
     UninterruptableMonitor.Enter(this);
     try
     {
         if (executed)
         {
             throw IllegalStateException.Create("Benchmark was already executed");
         }
         executed = true;
         runData.SetStartTimeMillis();
         algorithm.Execute();
     }
     finally
     {
         UninterruptableMonitor.Exit(this);
     }
 }