title: CAPL Programming usage of Timer as a delay
body: <p>I have been writing a CAPL script that would send message on each channel (2 no's) after a certain delay. The following delay i want to generate using <strong>SetTimer()</strong> and <strong>mstimer::isRunning</strong> function.
  I can use setTimer function but I dont know how to use <strong>mstimer::isRunning</strong>.
  The code is shown below:</p>
  
  <pre><code>    Variables{
            message * temp = {DLC=8};
            mstimer timer1;
      }
      on timer timer1{
          //Do nothing
      }
      onstart{
  
      for(noofChannel=1;noofChannel&lt;=2;noofChannel++){
          settimer(timer1,100);
          temp.CAN = noofChannel;
          temp.ID = 0xAA;
          While (mstimer::isrunning)==0 // I need to write this right.
          { //wait for timer to expire}
          Output(temp);
  
      }
  </code></pre>