title: Why am I not able to use stopwatch.Restart()?
body: <p>I'm trying to call <code>Restart()</code> on a stopwatch instance but am getting the following error when trying to call it:</p>
  
  <blockquote>
    <p>Assets/Scripts/Controls/SuperTouch.cs(22,59): error CS1061: Type
    <code>System.Diagnostics.Stopwatch' does not contain a definition for
    </code>Restart' and no extension method <code>Restart' of type
    </code>System.Diagnostics.Stopwatch' could be found (are you missing a using
    directive or an assembly reference?)</p>
  </blockquote>
  
  <p>This is my code:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  using System.Collections.Generic;
  using System.Diagnostics;
  
  namespace Controls
  {
  
      public class SuperTouch
      {
              public Vector2 position { get { return points [points.Count - 1]; } }
              public float duration { get { return (float)stopwatch.ElapsedMilliseconds; } }
              public float distance;
              public List&lt;Vector2&gt; points = new List&lt;Vector2&gt; ();
  
              public Stopwatch stopwatch = new Stopwatch ();
  
              public void Reset ()
              {
                      points.Clear ();
                      distance = 0;
                      stopwatch.Restart ();
              }
      }
  }
  </code></pre>