VR-Link JAVA API Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
List of all members | Public Member Functions | Private Attributes
com.mak.vrlj.vl.Clock Class Reference

A clock which tracks simulation time. More...

+ Collaboration diagram for com.mak.vrlj.vl.Clock:

Public Member Functions

 Clock ()
 Creates a clock starting at the current real time. More...
 
int hashCode ()
 
boolean equals (Object obj)
 
double elapsedRealTime ()
 Gets elapsed real time from clock creation. More...
 
double getApproxElapsedRealTime ()
 Gets the approximate elapsed real time. More...
 
double getInitialTime ()
 Gets the initial simulation time. More...
 
double getSimTime ()
 Gets the current simulation time. More...
 
boolean isSimTimeSet ()
 Indicates whether simulation time has been set. More...
 
void setApproxElapsedRealTime (double approxElapsedRealTime)
 Sets the approximate elapsed real time. More...
 
void setInitialTime (double initialTime)
 Sets the initial simulation time. More...
 
void setSimTime (double simTime)
 Set the current simulation time. More...
 

Private Attributes

double myInitialTime = 0.0
 
double mySimTime = 0.0
 
double myApproxElapsedRealTime = 0.0
 
boolean mySimTimeSet = false
 

Detailed Description

A clock which tracks simulation time.

Constructor & Destructor Documentation

com.mak.vrlj.vl.Clock.Clock ( )
inline

Creates a clock starting at the current real time.

Referenced by com.mak.vrlj.vl.Clock.equals().

Member Function Documentation

double com.mak.vrlj.vl.Clock.elapsedRealTime ( )
inline

Gets elapsed real time from clock creation.

Returns
the elapsed real time since this clock was created, in seconds, based on System.nanoTime()
boolean com.mak.vrlj.vl.Clock.equals ( Object  obj)
inline
double com.mak.vrlj.vl.Clock.getApproxElapsedRealTime ( )
inline

Gets the approximate elapsed real time.

Returns
the approximate elapsed real time since this clock was created, in seconds.

References com.mak.vrlj.vl.Clock.myApproxElapsedRealTime.

double com.mak.vrlj.vl.Clock.getInitialTime ( )
inline

Gets the initial simulation time.

Returns
the initial simulation time.

References com.mak.vrlj.vl.Clock.myInitialTime.

double com.mak.vrlj.vl.Clock.getSimTime ( )
inline

Gets the current simulation time.

Returns
the current simulation time, with 0.0 as the begining of the simulation.

References com.mak.vrlj.vl.Clock.mySimTime.

int com.mak.vrlj.vl.Clock.hashCode ( )
inline
boolean com.mak.vrlj.vl.Clock.isSimTimeSet ( )
inline

Indicates whether simulation time has been set.

Returns
true if the simulation time has been set, otherwise false.

References com.mak.vrlj.vl.Clock.mySimTimeSet.

void com.mak.vrlj.vl.Clock.setApproxElapsedRealTime ( double  approxElapsedRealTime)
inline

Sets the approximate elapsed real time.

Parameters
approxElapsedRealTimethe approximate elapsed real time in seconds.

References com.mak.vrlj.vl.Clock.myApproxElapsedRealTime.

void com.mak.vrlj.vl.Clock.setInitialTime ( double  initialTime)
inline

Sets the initial simulation time.

Parameters
initialTimethe initial simulation time.

References com.mak.vrlj.vl.Clock.myInitialTime.

void com.mak.vrlj.vl.Clock.setSimTime ( double  simTime)
inline

Set the current simulation time.

Parameters
simTimethe current simulation time.

References com.mak.vrlj.vl.Clock.mySimTime, and com.mak.vrlj.vl.Clock.mySimTimeSet.

Member Data Documentation

double com.mak.vrlj.vl.Clock.myApproxElapsedRealTime = 0.0
private
double com.mak.vrlj.vl.Clock.myInitialTime = 0.0
private
double com.mak.vrlj.vl.Clock.mySimTime = 0.0
private
boolean com.mak.vrlj.vl.Clock.mySimTimeSet = false
private

The documentation for this class was generated from the following file:

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)