div-timer

Timer.

Parameters

Parameters Description
id

string

Required parameter.

Timer ID. Must be unique. Used when calling actions for the selected timer, for example: start, stop.

duration

int

Timer duration in milliseconds. If the parameter is 0 or not specified, the timer runs indefinitely (until the timer stop event occurs).

Restriction for the value x: x >= 0.

Default value: 0.

end_actions

array

Actions performed when the timer ends: when the timer has counted to the duration value or the div-action://timer?action=stop&id=<id> command has been received.

tick_actions

array

Actions that are performed on each count of the timer.

tick_interval

int

Duration of time intervals in milliseconds between counts. If the parameter is not specified, the timer counts down from 0 to duration without calling tick_actions.

Restriction for the value x: x > 0.

value_variable

string

Name of the variable where the current timer value is stored. Updated on each count or when the timer commands are called (start, stop, and so on), except the cancel command.

JSON
{
  duration: "int",
  end_actions: [
    {
      download_callbacks: {
        on_fail_actions: [ div-action, ... ],
        on_success_actions: [ div-action, ... ]
      },
      is_enabled: "bool_int",
      log_id*: "string",
      log_url: "string",
      menu_items: [
        {
          action: div-action,
          actions: [ div-action, ... ],
          text*: "string"
        },
        ...
      ],
      payload: "object",
      referer: "string",
      target: "string",
      typed: div-action-typed,
      url: "string"
    },
    ...
  ],
  id*: "string",
  tick_actions: [
    {
      download_callbacks: {
        on_fail_actions: [ div-action, ... ],
        on_success_actions: [ div-action, ... ]
      },
      is_enabled: "bool_int",
      log_id*: "string",
      log_url: "string",
      menu_items: [
        {
          action: div-action,
          actions: [ div-action, ... ],
          text*: "string"
        },
        ...
      ],
      payload: "object",
      referer: "string",
      target: "string",
      typed: div-action-typed,
      url: "string"
    },
    ...
  ],
  tick_interval: "int",
  value_variable: "string"
}