title: how to take button hold as an input in Unity C#
body: <p>I am trying to create a situation where I can take <strong>"hold 'E' to interact"</strong> type of input. My first thoughts are, start a timer after the button has been held down. After the timer reaches 700 ms, take the action. But the problem, is I don't know how to write that in c# since I am new in this language. Any other approach is also appreciated.</p>
  
  <p>I am adding pseudocode here</p>
  
  <pre><code>//pseudocode
  //inside the update function
  
  if (e is pressed)
  {
     start timer;
     if (timer.time == 700)
     {
        Debug.Log("E is pressed for quite some time");
     }
  }
  </code></pre>