BAEL-1090 Fixed minor issue with total time calculation (#2589)
This commit is contained in:
parent
644ecbd0eb
commit
4589860efb
|
@ -17,7 +17,7 @@ public class CompactStringDemo {
|
|||
startTime = System.currentTimeMillis();
|
||||
String appended = (String) strings.stream().limit(100_000)
|
||||
.reduce("", (left, right) -> left.toString() + right.toString());
|
||||
totalTime = System.currentTimeMillis() - totalTime;
|
||||
totalTime = System.currentTimeMillis() - startTime;
|
||||
System.out.println("Created string of length " + appended.length()
|
||||
+ " in " + totalTime + " ms.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue