AMX SVSI N-Touch - setTimeout vs. setInterval
Frequently Asked Questions
Written by Wesley Moore
Updated at April 3rd, 2026
Brand:
- AMX
Models:
- N-Touch Programming
Question:
What is difference between setInterval and setTimeout?
Answer:
setTimeout allows us to run a function once after the interval of time. setInterval allows us to run a function repeatedly, starting after the interval of time, then repeating continuously at that interval.
setTimeout(expression, timeout) - runs the code/function after the timeout
setInterval(expression, timeout) - runs the code/function in intervals, with the length of the timeout between them