Skip to content
Discussion options

You must be logged in to vote

Hi @h0uter,

The example you provided was necessary to fix an issue with the older version of the plugin environment, whereby plugins were effectively "background tabs" running on chromium inside of the Qt WebEngine, which made timers not work consistently.

With the Node.js environment setInterval and clearInterval should work as expected out of the box.

The first parameter is the code you want to run and the second parameter is time in milliseconds. Here is a small example where it prints the seconds for 10 seconds:

let seconds = 0;
const interval = setInterval(() => {
  seconds++;
  streamDeck.logger.info(`Second ${seconds}`);
  if (counter >= 10) {
    clearInterval(interval);
    strea…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@h0uter
Comment options

Answer selected by ChekTek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants