javax.realtime
Class HighResolutionClock
java.lang.Object
javax.realtime.Clock
javax.realtime.HighResolutionClock
- public class HighResolutionClock
- extends Clock
This class provide an high resolution clock. The resolution is the
same as the clock speed at which the processor is running, on
Pentium processors.
- Author:
- Angelo Corsaro
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HighResolutionClock
public HighResolutionClock()
instance
public static HighResolutionClock instance()
getResolution
public RelativeTime getResolution()
- Return the resolution of the clock -- the interval between ticks.
- Specified by:
getResolution
in class Clock
- Returns:
- A RelativeTime object representing the resolution of this.
setResolution
public void setResolution(RelativeTime resolution)
- Set the resolution of this. For some hardwhere clocks setting
resolution impossible and if called on those nothing happens.
Implementation Note: If the requested resolution
overceeds the one obtainable by the underlying hardware this
method guarantees that the finest resolution possible is set.
- Specified by:
setResolution
in class Clock
- Parameters:
resolution
- The new resolution of this.
getTime
public void getTime(AbsoluteTime time)
- Return the current time in an existing object. The time
represented by the given AbsoluteTime is changed some time
between the invocation of the method and the return of the
method.
- Specified by:
getTime
in class Clock
- Parameters:
time
- The AbsoluteTime object which will have its
time changed.
getClockTickCount
public long getClockTickCount()
clockTickToTime
public RelativeTime clockTickToTime(long clockTicks)
clockTickToTime
public void clockTickToTime(long clockTicks,
RelativeTime time)
jRate is developed and maintained by the jRate project development team.
Copyright (c) 2001-2005 Angelo Corsaro and Morgan Deters.