United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 4478186 Add a high-resolution timer to the API
4478186 : Add a high-resolution timer to the API

Details
Type:
Enhancement
Submit Date:
2001-07-10
Status:
Resolved
Updated Date:
2003-10-25
Project Name:
JDK
Resolved Date:
2003-10-25
Component:
core-libs
OS:
solaris_8,generic,windows_98
Sub-Component:
java.util
CPU:
x86,sparc,unknown,generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0_01,1.4.2,5.0
Fixed Versions:
5.0

Related Reports
Duplicate:
Relates:
Relates:

Sub Tasks

Description
Many modern operating systems support two kinds of timers, a "regular" low resolution one with a maximal tolerance in 10s to 100s of MS and a "high resolution" timer with a much finer resolution. (In windows this is called the "multi-media timer" and is aprt of the Windows multi-media extensions.)  This high-resolution timer is essential for game and multi-media apps where fine timing is often essential and is oen of the most requested new Java features among game developers.

The API would most likely look like our current Timer API but have a higher resolution. Additionally there would be a call to determine the actual resolution of the high-res timer on the given VM/host platform combination.

The importance of this feature cannot be over-stated.  The 99% pure Java game Roboforge would have been 100% pure but at the end they had to put in native code to talk to the high-res timer themselves.

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
generic

FIXED IN:
tiger-beta

INTEGRATED IN:
tiger-beta


                                     
2004-06-14
SUGGESTED FIX

Consider making the timer in com.sun.j3d.util (Java3D) public and a part of core.
###@###.### 2002-06-11
                                     
2002-06-11
EVALUATION

   Seems like a reasonable enough request.

joshua.bloch@Eng 2001-07-11

This RFE has been addressed in the context of JSR-166 (java.util.concurrent).

Use java.lang.System.nanoTime

###@###.### 2003-10-24
                                     
2001-07-11



Hardware and Software, Engineered to Work Together