title: Loop in elixir with delay interval
body: <p>I have the following code in elixir, where I want to call a function - parseCsvFiles in a loop:</p>
  
  <pre><code>def loopParseFiles do
      spawn(Parse_Csv,:parseCsvFiles,[self])
      receive do
          {:parse_complete} -&gt; loopParseFiles
          after
           20000 -&gt; loopParseFiles
      end
  end
  </code></pre>
  
  <p>In the above code, I want to set a delay such that, the loopParseFiles function is called back after 20000 miliseconds or after :parse_complete is received - <strong>whichever is more</strong>.</p>
  
  <p>TIA :)</p>