A SERVICE OF

logo

122
Chapter 11: Sensors
csTimeSensor
csTimeSensor generates timer events either once or repeatedly for a specied interval. A
csTimeSensor is typically used to drive animations or periodic events.
A csTimeSensor has ve inputs:
enabled
loop
startTime
stopTime
cycleInterval
A csTimeSensors has four output events:
cycleTime
fractionChanged
isActive
time
Enabling csTimeSensor
To generate time sensor events, you must rst enable csTimeSensor by setting the
argument of the following method to TRUE:
csTimeSensor::setEnabled();
If the argument evaluates FALSE, time sensor events are not generated.
To determine whether or not a csTimeSensor is enabled, use the following method:
csTimeSensor::getEnabled();