Difference between revisions of "Bot Playground/Built-in Functions/Timer control"
From SmartBots Developers Docs
m (Gg moved page Bot Playground/Commands/Timer control to Bot Playground/Built-in Functions/Timer control) |
|||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
− | <onlyinclude>Standard timer control routines of | + | <onlyinclude>Standard timer control routines of JavaScript: setTimeout, setInterval etc.</onlyinclude> |
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
− | + | setTimeout(function() { console.log("This is a timer event!"); }, 5000); | |
</syntaxhighlight> | </syntaxhighlight> | ||
− | You can use standard | + | You can use standard JavaScripttimer routines: |
+ | * [https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout setTimeout()] | ||
+ | * clearTimeout() | ||
+ | * setInterval() | ||
+ | * clearInterval() | ||
− | |||
{{NavMenu}} | {{NavMenu}} | ||
__NOTOC__ | __NOTOC__ |
Revision as of 15:00, 6 October 2016
Standard timer control routines of JavaScript: setTimeout, setInterval etc.
setTimeout(function() { console.log("This is a timer event!"); }, 5000);
You can use standard JavaScripttimer routines:
- setTimeout()
- clearTimeout()
- setInterval()
- clearInterval()