Timer that will be stopped at the end of the script.


SYNTAX


public Timer CreateTimer (TimerCallback callback,object state,long dueTime,long period)



PARAMETERS


callback — TimerCallback


state — object


dueTime — long


period — long


RETURN


Timer Returns the timer that will be stopped at the end of the script.


EXAMPLE


using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using PTLRuntime.NETScript;

namespace Alert
{

     public class Alert : NETStrategy
     {
         private static System.Threading.Timer aTimer;

         public override void Init()
         {
             aTimer = CreateTimer(OnTimedEvent,null,0,500);
         }        
    
         private void OnTimedEvent(object source)
         {
             runAlert();
         }
    
         private void runAlert()
         {  
             Alert("Alert");
         }
     }
}