javax.media
Class Time

java.lang.Object
  |
  +--javax.media.Time

public class Time
extends java.lang.Object

Time is kept at nanosecond precision.

This is the JMF 1.0 Time interface.


Field Summary
protected  long nanoseconds
          Time in nanoseconds.
static long ONE_SECOND
           
static Time TIME_UNKNOWN
           
 
Constructor Summary
Time(double seconds)
          Constructs a Time using seconds.
Time(long nanoseconds)
          Constructs a Time using nanoseconds.
 
Method Summary
 long getNanoseconds()
          Gets the time value in nanoseconds.
 double getSeconds()
          Gets the time value in seconds.
protected  long secondsToNanoseconds(double seconds)
          Converts seconds to nanoseconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ONE_SECOND

public static final long ONE_SECOND

TIME_UNKNOWN

public static final Time TIME_UNKNOWN

nanoseconds

protected long nanoseconds
Time in nanoseconds.
Constructor Detail

Time

public Time(long nanoseconds)
Constructs a Time using nanoseconds.
Parameters:
nano - Number of nanoseconds for this time.

Time

public Time(double seconds)
Constructs a Time using seconds.
Parameters:
seconds - Time specified in seconds.
Method Detail

secondsToNanoseconds

protected long secondsToNanoseconds(double seconds)
Converts seconds to nanoseconds.

getNanoseconds

public long getNanoseconds()
Gets the time value in nanoseconds.
Returns:
time value in nanoseconds.

getSeconds

public double getSeconds()
Gets the time value in seconds.
Returns:
time value in seconds.