diff --git a/src/main/java/mattrixwv/Stopwatch.java b/src/main/java/mattrixwv/Stopwatch.java index 95771d4..fea7ac1 100644 --- a/src/main/java/mattrixwv/Stopwatch.java +++ b/src/main/java/mattrixwv/Stopwatch.java @@ -97,7 +97,11 @@ public class Stopwatch{ //Returns the time as a string at the 'best' resolution. (Goal is xxx.xxx) public String getStr(){ //Get the current duration from time - Double duration = getTime().doubleValue(); + return getStr(getTime().doubleValue()); + } + + public static String getStr(double nanoseconds){ + Double duration = nanoseconds; //Reduce the number to the appropriate number of digits. (xxx.x). //This loop works down to seconds TIME_RESOLUTION resolution;