This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
The following commit(s) were added to refs/heads/master by this push:
new 11ff1d6 Use the scale in the var name.
11ff1d6 is described below
commit 11ff1d6d23fc2f10b00053c0939c08f6377a5d0e
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Feb 2 18:00:22 2021 -0500
Use the scale in the var name.
---
.../commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java | 6 +++---
.../commons/imaging/examples/tiff/ExampleReadFloatingPointData.java | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git
a/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java
b/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java
index b66d166..5dc6b30 100644
---
a/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java
+++
b/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java
@@ -205,12 +205,12 @@ public class ApacheImagingSpeedAndMemoryTest {
HashMap<String, Object> params = new HashMap<>();
TiffImageParser tiffImageParser = new TiffImageParser();
// load the file and record time needed to do so
- final long time0 = System.nanoTime();
+ final long time0Nanos = System.nanoTime();
BufferedImage bImage = tiffImageParser.getBufferedImage(
byteSource, params);
- final long time1 = System.nanoTime();
+ final long time1Nanos = System.nanoTime();
// tabulate results
- final double testTime = (time1 - time0) / 1000000.0;
+ final double testTime = (time1Nanos - time0Nanos) / 1000000.0;
if (i > 1) {
n = i - 1;
sumTime += testTime;
diff --git
a/src/test/java/org/apache/commons/imaging/examples/tiff/ExampleReadFloatingPointData.java
b/src/test/java/org/apache/commons/imaging/examples/tiff/ExampleReadFloatingPointData.java
index 95d0044..7d5d964 100644
---
a/src/test/java/org/apache/commons/imaging/examples/tiff/ExampleReadFloatingPointData.java
+++
b/src/test/java/org/apache/commons/imaging/examples/tiff/ExampleReadFloatingPointData.java
@@ -114,12 +114,12 @@ public class ExampleReadFloatingPointData {
// If only a sub-image is desired, the params Mao can be used
// to specify what section of the data is to be extracted.
// See the Javadoc for readFloatingPointRasterData for more details.
- final long time0 = System.nanoTime();
+ final long time0Nanos = System.nanoTime();
final HashMap<String, Object> params = new HashMap<>();
final TiffRasterData rasterData
= directory.getFloatingPointRasterData(params);
- final long time1 = System.nanoTime();
- System.out.println("Data read in " + ((time1 - time0) / 1.0e+6) + "
ms");
+ final long time1Nanos = System.nanoTime();
+ System.out.println("Data read in " + ((time1Nanos - time0Nanos) /
1.0e+6) + " ms");
// One of the test files in the Commons Imaging distribution uses
// the value 9999 as a special "No Data" indicator. In that case,