Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
IN JDK1.1 and 1.2, System.currentTimeMillis has a resolution of 50ms. This 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)); > } > }
|