All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javax.media.Time

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

public class Time
extends Object
Time abstracts time in the Java Media framework.

Version:
1.10, 97/08/28.
See Also:
Clock, TimeBase

Variable Index

 o nanoseconds
Time is kept to a granularity of nanoseconds.
 o ONE_SECOND

Constructor Index

 o Time(double)
Construct a time in seconds.
 o Time(long)
Construct a time in nanoseconds.

Method Index

 o getNanoseconds()
Get the time value in nanoseconds.
 o getSeconds()
Get the time value in seconds.
 o secondsToNanoseconds(double)
Convert seconds to nanoseconds.

Variables

 o ONE_SECOND
 public static final long ONE_SECOND
 o nanoseconds
 protected long nanoseconds
Time is kept to a granularity of nanoseconds. Converions to and from this value are done to implement construction or query in seconds.

Constructors

 o Time
 public Time(long nano)
Construct a time in nanoseconds.

Parameters:
nano - Number of nanoseconds for this time.
 o Time
 public Time(double seconds)
Construct a time in seconds.

Parameters:
seconds - Time specified in seconds.

Methods

 o secondsToNanoseconds
 protected long secondsToNanoseconds(double seconds)
Convert seconds to nanoseconds.

 o getNanoseconds
 public long getNanoseconds()
Get the time value in nanoseconds.

Returns:
The time in nanoseconds.
 o getSeconds
 public double getSeconds()
Get the time value in seconds.


All Packages  Class Hierarchy  This Package  Previous  Next  Index