title: Stopwatch displaying wrong times?
body: <pre><code>    public void GnomeSort&lt;T&gt;(IList&lt;T&gt; list, IComparer&lt;T&gt; comparer)
      {
          sortTimer = new Stopwatch();
          sortTimer.Start();
          bool stillGoing = true;
          while (stillGoing)
          {
              stillGoing = false;
              for (int i = 1; i &lt; list.Count; )
              {
                  T x = list[i - 1];
                  T y = list[i];
                  if (comparer.Compare(x, y) &lt;= 0)
                      i++;
                  else
                  {
                      list[i - 1] = y;
                      list[i] = x;
                      i--;
                      if (i == 0)
                          i = 1;
                      stillGoing = true;
                  }
              }
          }
          sortTimer.Stop();
          richTextBox1.Text += "Gnome Sorting completed, total time taken " + sortTimer.Elapsed + "\n";
      }
  </code></pre>
  
  <p>If I run this twice, using the same unsorted randomly generated array here:</p>
  
  <pre><code>            randomArray = randomizedArray
                  (Convert.ToInt32(textBox1.Text), Convert.ToInt32(textBox2.Text));
              randomArrayGnome = randomArray;
              randomArrayBubble = randomArray;
              randomArrayInsertion = randomArray;
  
              GnomeSort(randomArray);
              BubbleSort(randomArrayBubble);
  </code></pre>
  
  <p>But it outputs something close to this:</p>
  
  <pre><code>Gnome Sorting completed, total time taken 00:00:02.5419864
  Bubble Sorting completed, total time taken 00:00:00.0003556
  </code></pre>
  
  <p>but if I switch the call order, the times are drastically different, instead Bubble Sorting may take 6 seconds. What is happening here? How come it isn't sorting them correctly?</p>