is too inaccurate for many purposes. Here is a test program:
> class timeres {
>
> public static void main(String args[]) {
>
> long t1;
> long t2;
> t1 = System.currentTimeMillis();
> t2 = t1;
> while (t2==t1)
> t2 = System.currentTimeMillis();
> System.out.println("Time difference is "+(t2-t1));
> }
> }
- duplicates
-
JDK-4143354 java.lang.Thread.sleep(millis) sleeps less than specified.
-
- Closed
-
-
JDK-4236825 Very slow update of the currentTimeMillis()
-
- Closed
-
-
JDK-4237145 System.currentTimeMillis() updates slow in Win95 and NT
-
- Closed
-
- relates to
-
JDK-4313758 (spec) java.lang.System.currentTimeMillis: Spec should mention granularity
-
- Closed
-
-
JDK-4237283 Need a way to synchronize with the vertical refresh cycle of the framebuffer
-
- Open
-
-
JDK-4704111 Need higher resolution System.currentTimeMillis on Win32
-
- Closed
-
-
JDK-4240408 java.lang.Thread.sleep(millis, nanos) sleeps less than specified.
-
- Closed
-