Nice simple command to pause program execution for a set length of time.
While I have already written a function to do this:
FUNCTION Pause: ms
LOCAL time1,time2
time1=GETTIMERALL()
WHILE TRUE
time2=GETTIMERALL()
IF time2>time1+ms THEN BREAK
WEND
ENDFUNCTION
it would be nice to have it as part of the language.
What do you think, is this the same than a delay command? Will it save CPU power?
IF timer < GETTIMERALL()
....SOME CODE.....
timer = GETTIMERALL()+delay
ENDIF
New command: SLEEP, get the update ;)
Yeah. This will save CPU power.