01: /*
02: *
03: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
04: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
05: *
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU General Public License version
08: * 2 only, as published by the Free Software Foundation.
09: *
10: * This program is distributed in the hope that it will be useful, but
11: * WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * General Public License version 2 for more details (a copy is
14: * included at /legal/license.txt).
15: *
16: * You should have received a copy of the GNU General Public License
17: * version 2 along with this work; if not, write to the Free Software
18: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19: * 02110-1301 USA
20: *
21: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
22: * Clara, CA 95054 or visit www.sun.com if you need additional
23: * information or have any questions.
24: */
25:
26: package javax.microedition.media;
27:
28: /**
29: * A <code>TimeBase</code> is a constantly ticking source of time.
30: * It measures the progress of time and
31: * provides the basic means for synchronizing media playback for
32: * <code>Player</code>s.
33: * <p>
34: * A <code>TimeBase</code> measures time in microseconds in
35: * order to provide the necessary resolution for synchronization.
36: * It is acknowledged that some implementations may not be able to
37: * support time resolution in the microseconds range. For such
38: * implementations, the internal representation of time can be done
39: * within their limits.
40: * But the time reported via the API must be scaled to the microseconds
41: * range.
42: * <p>
43: * <code>Manager.getSystemTimeBase</code> provides the default
44: * <code>TimeBase</code> used by the system.
45: *
46: * @see Player
47: */
48: public interface TimeBase {
49:
50: /**
51: * Get the current time of this <code>TimeBase</code>. The values
52: * returned must be non-negative and non-decreasing over time.
53: *
54: * @return the current <code>TimeBase</code> time in microseconds.
55: */
56: long getTime();
57: }
|