Package org.web3d.vrml.nodes
Interface VRMLClock
- All Known Subinterfaces:
TimeSensorManager
- All Known Implementing Classes:
RealTimeSensorManager
,TimeScheduler
,VirtualTimeSensorManager
public interface VRMLClock
Abstract representation of the System clock for various informational purposes.
- Version:
- $Revision: 1.5 $
- Author:
- Justin Couch
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a time listener to this clock.double
getTime()
Request the current time from the system clock.long
Request the time in wall-clock coordinates.void
Remove a time listener to this clock.void
Reset the clock to the current time as time zero.
-
Method Details
-
getTime
double getTime()Request the current time from the system clock. The time returned is the VRML scene time which is in seconds.- Returns:
- The current time in VRML coordinates
-
getWallTime
long getWallTime()Request the time in wall-clock coordinates. This is standard Unix epoch time.- Returns:
- The current wall-clock time
-
resetTimeZero
void resetTimeZero()Reset the clock to the current time as time zero. This can only be called when the timer is not enabled. The last wall clock time is set to now so that fraction information will be correctly oriented for the next time it is enabled. -
addTimeListener
Add a time listener to this clock. Only one instance of each listener will be registered and null references are ignored.- Parameters:
l
- The listener instance to add
-
removeTimeListener
Remove a time listener to this clock. If the listener is not known to this implementation, it is silently ignored.- Parameters:
l
- The listener instance to add
-