uk.org.toot.transport
Class AbstractTimeSource

java.lang.Object
  extended by uk.org.toot.transport.AbstractTimeSource
All Implemented Interfaces:
TimeSource
Direct Known Subclasses:
DefaultTimeSource

public abstract class AbstractTimeSource
extends java.lang.Object
implements TimeSource

A TimeSource that extrapolates from discrete previously set pairs of times, time source location and System time location, both in microseconds. Since the System time location is continuous, at least from our sampled view of it, we can use it to generate effectively continuous time source locations, even though typically we only know the actual value at highly discrete intervals. Should take account of glitches and wrap-round.


Constructor Summary
AbstractTimeSource()
           
 
Method Summary
 long getMicrosecondLocation()
          Called to obtain the time source time, in microseconds, probably much more frequently than time source times are actually updated.
 void setMicrosecondLocation(long time)
          Called with discrete known time source times, in microseconds.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTimeSource

public AbstractTimeSource()
Method Detail

setMicrosecondLocation

public void setMicrosecondLocation(long time)
Called with discrete known time source times, in microseconds.


getMicrosecondLocation

public long getMicrosecondLocation()
Called to obtain the time source time, in microseconds, probably much more frequently than time source times are actually updated.

Specified by:
getMicrosecondLocation in interface TimeSource


Copyright © 2004, 2005, 2006, 2007 Steve Taylor. All Rights Reserved.