title: MSP430 TI while loop duration
body: <p>I am programming a simple program on the TI MSP430.</p>
  
  <p>I have a counter set up in C:</p>
  
  <pre><code>while (P1IN &amp; BIT1)
  {
  counter++;
  }
  </code></pre>
  
  <p>So when the pin is high, it counts up by one. I am wondering how long this takes? </p>
  
  <p>I need to do some calculations with counter and need the duration of one while loop. In other words, say counter = 1234 in the end, how can I get a value of seconds? </p>
  
  <p>How can I get this? Should I export the ASM code and see how long each instruction set takes? This seems tedious. </p>