title: How long it takes to GCC compiler execute an asm volatile ("nop"/::) instruction?
body: <p>I have a C code in UNIX where I need to keep my processor doing nothing for 2 seconds.
  In order to do that, I found the assembly instruction <strong>asm volatile("nop"::)</strong>. I've searched a lot but I couldn't find anywhere explaining how can I calculate the necessary number of NOPs to execute my function for exactly 2 seconds. Can anyone help me?</p>
  
  <pre><code>for(i = 0; i &lt; COUNTER; i++){
      asm volatile ("nop"::);
  }
  </code></pre>