< prev index next >
test/jdk/java/util/concurrent/atomic/DoubleAdderDemo.java
Print this page
8225490: Miscellaneous changes imported from jsr166 CVS 2019-09
Reviewed-by: martin, alanb
@@ -101,12 +101,12 @@
static void report(int nthreads, int incs, long time, double sum) {
long total = (long)nthreads * incs;
if (sum != (double)total)
throw new Error(sum + " != " + total);
- double secs = (double)time / (1000L * 1000 * 1000);
- long rate = total * (1000L) / time;
+ double secs = (double)time / 1000_000_000L;
+ long rate = total * 1000L / time;
System.out.printf("threads:%3d Time: %7.3fsec Incs per microsec: %4d\n",
nthreads, secs, rate);
}
static long timeTasks(Phaser phaser) {
< prev index next >