Updated more sonarqube findings
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
//JavaClasses/src/main/java/mattrixwv/Stopwatch.java
|
||||
//Matthew Ellison (Mattrixwv)
|
||||
// Created: 03-01-19
|
||||
//Modified: 07-28-20
|
||||
//Modified: 06-26-22
|
||||
//This file contains a class that is used to time the execution time of other programs
|
||||
/*
|
||||
Copyright (C) 2020 Matthew Ellison
|
||||
Copyright (C) 2022 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
|
||||
@@ -71,27 +71,27 @@ public class Stopwatch{
|
||||
stopTime = null;
|
||||
}
|
||||
//Returns the time in nanoseconds
|
||||
public double getNano() throws InvalidResult{
|
||||
public double getNano(){
|
||||
return getTime().doubleValue();
|
||||
}
|
||||
//Returns the time in microseconds
|
||||
public double getMicro() throws InvalidResult{
|
||||
public double getMicro(){
|
||||
return getTime().doubleValue() / 1000D;
|
||||
}
|
||||
//Returns the time in milliseconds
|
||||
public double getMilli() throws InvalidResult{
|
||||
public double getMilli(){
|
||||
return getTime().doubleValue() / 1000000D;
|
||||
}
|
||||
//Returns the time in seconds
|
||||
public double getSecond() throws InvalidResult{
|
||||
public double getSecond(){
|
||||
return getTime().doubleValue() / 1000000000D;
|
||||
}
|
||||
//Returns the time in minutes
|
||||
public double getMinute() throws InvalidResult{
|
||||
public double getMinute(){
|
||||
return getTime().doubleValue() / 60000000000D;
|
||||
}
|
||||
//Returns the time in hours
|
||||
public double getHour() throws InvalidResult{
|
||||
public double getHour(){
|
||||
return getTime().doubleValue() / 3600000000000D;
|
||||
}
|
||||
//Returns the time as a string at the 'best' resolution. (Goal is xxx.xxx)
|
||||
|
||||
Reference in New Issue
Block a user