Is there an additional custom timer available for programming?

Q

Is there an additional custom timer available for programming?

A

No. The only beat you have is the cycle time the script is called up periodically. Based on a global variable that counts the cycles you can derive relative times by subtraction.

Example code:

mytime = mytime + 1
if mystate == START then
  timesave = mytime
  mystate = WAIT_TIMEOUT
  elseif mystate == WAIT_TIMEOUT
  timediff = mytime - timesave
  if timediff > 1000 then
  end
end

in netSCRIPT you get the current cycle time it is runnig at using the function util.GetCycleTime()

Example Code:

MyCycleTime = util.GetCycleTime()