What can we improve?

Documentation

(Edit)

RegisterTimer

Requires: IP-Symcon >= 4.0

void RegisterTimer (string $Name, integer $Interval, string $Script content)

Parameters

Name Name of the timer
Interval Interval in milliseconds with which the timer should be created. 0 = never
Script content PHP script without PHP tags (<?php ... )

Returns

No Return

Description

This function creates a timer with the name Name. It can also be specified which interval is to be set when creating and the script content will be defined. The timer is stateless. Therefore, following each restart the timer is set anew with the interval previously set here. Interval settings must be reloaded in ApplyChanges().

The timer can only be created in the "Create ()" function. If the timer is to be switched off or not to start: SetTimerInterval to 0.

The content of script content is overwritten every time, therefore the correct content can always be guaranteed, even after changes.

Example

// Creates a timer named "Update" with an interval of 5 seconds. 
$this->RegisterTimer("Update", 5000, "echo 'Hello World';");
Deutsche Webseite verfügbar
Go to cart
Any questions?