Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
function execute() {
  if (!context.delay) {
    context.delay = parseInt(inPorts[1].value, 10) || 2000;
  }

  switch (trigger) {
    case TRIGGERS.SYSTEM_SYNC:
      return [new Date()];
    case 0:
      syncSleep(context.delay);
      break;
    case 1:
      context.delay = inPorts[1].value;
      break;
    default: break;
  }

  return [];
}

...

In Ports

Position

Name

Message Type

Description

1

In

Trigger

This port is being used to trigger the 'Timeout' object.

2

Delay (ms)

Number

This port is being used to define the Delay in milliseconds that should happen before the 'Timeout' object is sending out the trigger message from the Out Port 1.

...

Out Ports

Position

Name

Message Type

Description

1

Out

Trigger

This port is being used to send out the trigger message of the 'Timeout' object.

...

Properties

Name

Description

Object Name

The name of the object on the canvas.

Show Code View

The switch to turn on code view for the Code Object.

Duplicate code into custom Code Object

Image Modified