Xj3D 2.0 VRML/X3D Code API

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
 void addTimeListener(VRMLTimeListener l)
          Add a time listener to this clock.
 double getTime()
          Request the current time from the system clock.
 long getWallTime()
          Request the time in wall-clock coordinates.
 void removeTimeListener(VRMLTimeListener l)
          Remove a time listener to this clock.
 void resetTimeZero()
          Reset the clock to the current time as time zero.
 

Method Detail

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 coodinates

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

void addTimeListener(VRMLTimeListener l)
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

void removeTimeListener(VRMLTimeListener l)
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

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium