title: Restructuring Infinite loop with Arrow Code
body: <p>I have an infinite loop with certain period (delay). I have the following structure:</p>
  <pre><code>// define the i32threshold of time
  // set i32counter to 0
  while(true)
  {
    if(bExecuteEnable)
    {
      if(bConnectionSet)
      {
        if(++i32counter &gt;= i32threshold)
        {
          // Do the job
          counter = 0;
        }
      }
    }
  
    delay(1); // 1 ms of delay introduces the period
  }
  </code></pre>
  <p>Do you have any recommendation to restructure this infinite loop other than having all conditions merged into single <code>if</code>statement?</p>