org.commonreality.time.impl
Class RealTimeClock

java.lang.Object
  extended by org.commonreality.time.impl.RealTimeClock
All Implemented Interfaces:
IClock

public class RealTimeClock
extends java.lang.Object
implements IClock

Author:
developer

Constructor Summary
RealTimeClock()
           
 
Method Summary
 double getTime()
           
 double waitForChange()
          wait for any change of time
 double waitForTime(double time)
          wait for this time to be reached, returning the current time
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RealTimeClock

public RealTimeClock()
Method Detail

getTime

public double getTime()
Specified by:
getTime in interface IClock
Returns:
the current time
See Also:
IClock.getTime()

waitForChange

public double waitForChange()
                     throws java.lang.InterruptedException
Description copied from interface: IClock
wait for any change of time

Specified by:
waitForChange in interface IClock
Throws:
java.lang.InterruptedException
See Also:
IClock.waitForChange()

waitForTime

public double waitForTime(double time)
                   throws java.lang.InterruptedException
Description copied from interface: IClock
wait for this time to be reached, returning the current time

Specified by:
waitForTime in interface IClock
Returns:
Throws:
java.lang.InterruptedException
See Also:
IClock.waitForTime(double)