Server
API Reference Guide
Product Documentation:

Visualization Server
Documentation Home
List of all members | Public Member Functions | Public Attributes
javascript::IlsTimer Class Reference

IlsTimer JavaScript proxy. More...

#include <javascript/serverside.h>

Public Member Functions

 IlsTimer (String id, Int sec, Int mvsec, String timerProcName, any timerProcArg)
 This constructor builds a new timer named id, with a period of sec seconds and msec milliseconds, which will trigger the JavaScript function named timerProcName. The callback function receives the timer as its argument and the timerProcArg parameter. More...
 
void start ()
 Triggers the timer.
 
void stop ()
 Stops the running timer.
 

Public Attributes

String id
 The name used to initialize the timer.
 
Int msec
 The period of the timer in milliseconds.
 
Boolean running
 True when the timer is currently running. More...
 
Boolean runOnce
 True when the timer is planned to be run only once or false if the timer should be triggered more than once. More...
 
Int sec
 The period of the timer in seconds.
 
any timerProcArg
 The extra argument which is passed to timerProc when the timer is fired.
 
String timerProcName
 The name of the script procedure that must be called when the timer is fired.
 

Detailed Description

IlsTimer JavaScript proxy.

Warning
This class is a JavaScript class, not a C++ one.
See also
IlsTimer (C++).

Constructor & Destructor Documentation

◆ IlsTimer()

javascript::IlsTimer::IlsTimer ( String  id,
Int  sec,
Int  mvsec,
String  timerProcName,
any  timerProcArg 
)

This constructor builds a new timer named id, with a period of sec seconds and msec milliseconds, which will trigger the JavaScript function named timerProcName. The callback function receives the timer as its argument and the timerProcArg parameter.

Parameters
idname of the timer.
secnumber of seconds of the timer's period.
mvsecnumber of milliseconds of the timer's period.
timerProcNamename of the callback called at the end of the timer's period.
timerProcArgadditional parameter passed to the callback.

Member Data Documentation

◆ running

Boolean javascript::IlsTimer::running

True when the timer is currently running.

This is a read-only property.

◆ runOnce

Boolean javascript::IlsTimer::runOnce

True when the timer is planned to be run only once or false if the timer should be triggered more than once.

The default value is true.