org.commonreality.time.impl
Class SharedClock

java.lang.Object
  extended by org.commonreality.time.impl.BasicClock
      extended by org.commonreality.time.impl.OwnedClock<java.lang.Thread>
          extended by org.commonreality.time.impl.SharedClock
All Implemented Interfaces:
IClock, IOwnableClock<java.lang.Thread>, ISetableClock

public class SharedClock
extends OwnedClock<java.lang.Thread>

Author:
developer

Constructor Summary
SharedClock()
           
 
Method Summary
 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 org.commonreality.time.impl.OwnedClock
addOwner, getOwners, isOwner, removeOwner, setTime, setTime
 
Methods inherited from class org.commonreality.time.impl.BasicClock
await, getTime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.commonreality.time.IClock
getTime
 

Constructor Detail

SharedClock

public SharedClock()
Method Detail

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
Overrides:
waitForTime in class BasicClock
Returns:
Throws:
java.lang.InterruptedException
See Also:
IClock.waitForTime(double)

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
Overrides:
waitForChange in class BasicClock
Throws:
java.lang.InterruptedException
See Also:
IClock.waitForChange()