Update cookies preferences
Promotic

onTimeChange - event of the PmaRoot object

Description:
The event is triggered on the change of the computer system time.
The event is triggered only if the change is greater than 5 seconds.
Parameters:
pMe(Object) Reference to the PmaRoot object where the event rises.
pEvent(Object) Reference to an object describing detailed information about the specific event.
pEvent.DiffSec - (Long) [for reading] Difference of the change in seconds. When the time changes forward, the value is positive, when backward, it is negative.
pEvent.OldTime - (Date) [for reading] Time after which the change occurred.
Note:
The time change is detected by the PROMOTIC system as follows:
The internal clock of the PROMOTIC system ticks with the specific period (about 10 ms). Every tick the system finds out the daytime and stores it. It compares it with time of the previous tick and if the difference is greater than 5 seconds, then the PROMOTIC system concludes from this that the time changed. In very extreme cases when somebody stopped the PROMOTIC application for 5 seconds, the PROMOTIC system could invoke this event even if no time change occurred.
See also:
- Pm.Time (property)
Example:
JavaScriptVBScriptSelect and copy to clipboard

var nDiff = Pm.Abs(pEvent.DiffSec);
if (nDiff >= 5)
{
Pm.Debug("Time differencion >= 5 second");
}
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.