public class MasterSlaveClock extends SharedClock
BasicClock.IClockWaiter, BasicClock.WaitFor
_lock, _timeChangeCondition
Constructor and Description |
---|
MasterSlaveClock(IClock primary,
java.lang.Thread primaryOwner) |
Modifier and Type | Method and Description |
---|---|
double |
getTime() |
protected boolean |
requestTime(double requestedTime)
since this might actually set the time to the requestedTime, the return
value varies.
|
protected double |
setTimeInternal(double time)
actually set the time
|
createWaitForAny, createWaitForTime
addOwner, getOwners, isOwner, removeOwner, setInvalidAccessThrowsException, setTime, updateTime
await, constrainPrecision, getDefaultWaitTime, getTimeShift, getTimeSlipTolerance, getWaitForAny, getWaitForTime, isIgnoringDiscrepencies, setDefaultWaitTime, setIgnoreDiscrepencies, setTime, setTimeShift, setTimeSlipTolerance, waitForChange, waitForTime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTimeShift, setTimeShift, waitForChange, waitForTime
public MasterSlaveClock(IClock primary, java.lang.Thread primaryOwner)
public double getTime()
getTime
in interface IClock
getTime
in class BasicClock
IClock.getTime()
protected double setTimeInternal(double time)
BasicClock
setTimeInternal
in class BasicClock
protected boolean requestTime(double requestedTime) throws java.lang.InterruptedException
SharedClock
requestTime
in class SharedClock
requestedTime
- NaN if waitForChange was calledjava.lang.InterruptedException