title: erlang for loop for queries
body: <p>I have this function:</p>
  
  <pre><code>show_employee_table() -&gt;
      do(qlc:q([B || B &lt;- mnesia:table(employee)])).
  </code></pre>
  
  <p>What it does is that it goes to a table called employee and prints the contents to the user.</p>
  
  <p>Concept: I want to make another function say called <code>show(times) --&gt;</code>, this function will take a table name and the number of times to call the show_table function.</p>
  
  <p>If I input (employee,100), I want to have a for loop that runs 100 times, the idea is to measure the time taken to run the loop. In java I would do something like this:</p>
  
  <pre><code>Time t = time.now();
  for ( I=0; I&lt;N; I++){
  show_employee_table() -&gt;
      do(qlc:q([B || B &lt;- mnesia:table(employee)])).
  }
  
  Time t2 = time.now();
  
  timetaken = t2 - t1;
  </code></pre>
  
  <p>That's how I want to do it, but in erlang. I just don't know the syntax in erlang and I would appreciate it if someone can help me.</p>