Updated libraries and increased test coverage

This commit is contained in:
2023-04-13 19:12:33 -04:00
parent 783fc7009c
commit f4dbf4e4dc
20 changed files with 560 additions and 227 deletions

View File

@@ -1,10 +1,10 @@
//JavaClasses/src/main/java/mattrixwv/Stopwatch.java
//Matthew Ellison (Mattrixwv)
// Created: 03-01-19
//Modified: 06-26-22
//Modified: 04-13-23
//This file contains a class that is used to time the execution time of other programs
/*
Copyright (C) 2022 Matthew Ellison
Copyright (C) 2023 Matthew Ellison
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -122,6 +122,10 @@ public class Stopwatch{
}
}
if(duration < 0){
resolution = TIME_RESOLUTION.ERROR;
}
//Turn the number into a string
int durationFraction = (int)Math.round(((duration % 1) * 1000));
String time = String.format("%d.%03d", duration.intValue(), durationFraction);
@@ -143,11 +147,6 @@ public class Stopwatch{
@Override
public String toString(){
try{
return getStr();
}
catch(InvalidResult error){
return "There was an error in getStr(): " + error;
}
return getStr();
}
}