diff --git a/mattrixwv/Stopwatch.java b/mattrixwv/Stopwatch.java index e20a573..47464c9 100644 --- a/mattrixwv/Stopwatch.java +++ b/mattrixwv/Stopwatch.java @@ -134,4 +134,9 @@ public class Stopwatch{ //Return the string return time; } + + @Override + public String toString(){ + return getStr(); + } } diff --git a/testStopwatch.java b/testStopwatch.java index 6f3a4fe..4cb722b 100644 --- a/testStopwatch.java +++ b/testStopwatch.java @@ -56,6 +56,7 @@ public class testStopwatch{ //Print the results System.out.printf("The timer results in: %s\n", timer.getStr()); + System.out.printf("The timer results in: " + timer + "\n"); System.out.printf("The timer results in: %f milliseconds\n", timer.getMilli()); if(!failed){