org.commonreality.time.impl.net
Class NetworkedSetableClock

java.lang.Object
  extended by org.commonreality.time.impl.net.NetworkedSetableClock
All Implemented Interfaces:
IClock, INetworkedClock

public class NetworkedSetableClock
extends java.lang.Object
implements IClock, INetworkedClock

Author:
developer

Constructor Summary
NetworkedSetableClock(IParticipant participant)
           
 
Method Summary
 double getTime()
           
 void setCurrentTimeCommand(ITimeCommand timeCommand)
           
 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

NetworkedSetableClock

public NetworkedSetableClock(IParticipant participant)
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)

setCurrentTimeCommand

public void setCurrentTimeCommand(ITimeCommand timeCommand)
Specified by:
setCurrentTimeCommand in interface INetworkedClock