Fixed a few typos

This commit is contained in:
2020-08-23 02:34:59 -04:00
parent db6aee504d
commit 019ed3244b

View File

@@ -36,7 +36,7 @@ public class Stopwatch{
//Returns a long with the elapsed time in nanoseconds. Used by other functions to get the time before converting it to the correct resolution
private Long getTime(){
if(startTime == null){
///This should throw an exception instead of returning 0
//TODO: This should throw an exception instead of returning 0
return 0L;
}
else if(stopTime == null){
@@ -55,7 +55,7 @@ public class Stopwatch{
//Get the time as close to returning from the function as possible
startTime = System.nanoTime();
}
//SImulates stoping a stopwatch by saving the time
//Simulates stopping a stopwatch by saving the time
public void stop(){
//Set the stopTime as close to call time as possible
stopTime = System.nanoTime();
@@ -135,7 +135,7 @@ public class Stopwatch{
case MINUTE: time += " minutes"; break;
case HOUR: time += " hours"; break;
case ERROR:
default: time = "There was an error computing the time"; break; ///This should throw an error instead
default: time = "There was an error computing the time"; break; //TODO: This should throw an error instead
}
//Return the string
return time;