diff --git a/mattrixwv/Stopwatch.class b/mattrixwv/Stopwatch.class index da3ba87..2c50653 100644 Binary files a/mattrixwv/Stopwatch.class and b/mattrixwv/Stopwatch.class differ diff --git a/mattrixwv/Stopwatch.java b/mattrixwv/Stopwatch.java index c4c95b0..258b962 100644 --- a/mattrixwv/Stopwatch.java +++ b/mattrixwv/Stopwatch.java @@ -101,8 +101,8 @@ public class Stopwatch{ } //Turn the number into a string - Double durationFraction = ((duration % 1) * 100); - String time = String.format("% 3d.%03d", duration.intValue(), durationFraction.intValue()); + Double durationFraction = ((duration % 1) * 1000); + String time = String.format("%d.%03d", duration.intValue(), durationFraction.intValue()); //Tack on the appropriate suffix for resolution switch(resolution){ diff --git a/testStopwatch.java b/testStopwatch.java index d715cf1..6f3a4fe 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: %f milliseconds\n", timer.getMilli()); if(!failed){ System.out.println("All tests completed successfully");