BAEL-1090 Fixed minor issue with total time calculation (#2589)

This commit is contained in:
Predrag Maric 2017-09-09 00:43:20 +02:00 committed by GitHub
parent 644ecbd0eb
commit 4589860efb
1 changed files with 1 additions and 1 deletions

View File

@ -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.");
}