IO: Uniform report syntax

This commit is contained in:
2024-04-03 07:23:32 +02:00
parent a94e1adc68
commit 661c10c2b1
5 changed files with 5 additions and 5 deletions

View File

@@ -48,7 +48,7 @@ public class ClassicIoBuffered {
int lines = lineCount("input.txt", true); int lines = lineCount("input.txt", true);
long stopTime = System.nanoTime(); long stopTime = System.nanoTime();
System.out.println("Lines: " + String.valueOf(lines)); System.out.println("Lines: " + String.valueOf(lines));
System.out.println("Time it took: " + (stopTime - startTime - dryRun) + " "); System.out.println("Time to complete: " + (stopTime - startTime - dryRun) + " " + dryRun);
} }
} }

View File

@@ -43,7 +43,7 @@ public class ClassicIoManBuffered {
int lines = lineCount("input.txt", true); int lines = lineCount("input.txt", true);
long stopTime = System.nanoTime(); long stopTime = System.nanoTime();
System.out.println("Lines: " + String.valueOf(lines)); System.out.println("Lines: " + String.valueOf(lines));
System.out.println("Time it took: " + (stopTime - startTime - dryRun) + " "); System.out.println("Time to complete: " + (stopTime - startTime - dryRun) + " " + dryRun);
} }
} }

View File

@@ -40,7 +40,7 @@ public class ClassicIoUnbuffered {
int lines = lineCount("input.txt", true); int lines = lineCount("input.txt", true);
long stopTime = System.nanoTime(); long stopTime = System.nanoTime();
System.out.println("Lines: " + String.valueOf(lines)); System.out.println("Lines: " + String.valueOf(lines));
System.out.println("Time it took: " + (stopTime - startTime - dryRun) + " " + dryRun); System.out.println("Time to complete: " + (stopTime - startTime - dryRun) + " " + dryRun);
} }
} }

View File

@@ -46,7 +46,7 @@ public class ClassicIoWholeFile {
int lines = lineCount("input.txt", true); int lines = lineCount("input.txt", true);
long stopTime = System.nanoTime(); long stopTime = System.nanoTime();
System.out.println("Lines: " + String.valueOf(lines)); System.out.println("Lines: " + String.valueOf(lines));
System.out.println("Time it took: " + (stopTime - startTime - dryRun) + " "); System.out.println("Time to complete: " + (stopTime - startTime - dryRun) + " " + dryRun);
} }
} }

View File

@@ -87,7 +87,7 @@ public class NioLineCount {
int lines = lineCount("input.txt", true); int lines = lineCount("input.txt", true);
long stopTime = System.nanoTime(); long stopTime = System.nanoTime();
System.out.println("Lines: " + String.valueOf(lines)); System.out.println("Lines: " + String.valueOf(lines));
System.out.println("Time it took: " + (stopTime - startTime - dryRun) + " " + dryRun); System.out.println("Time to complete: " + (stopTime - startTime - dryRun) + " " + dryRun);
} }
} }