Updated to fix some warnings

This commit is contained in:
2020-08-24 14:18:45 -04:00
parent 6725c5fe29
commit fe80d93bdf
2 changed files with 11 additions and 6 deletions

View File

@@ -124,6 +124,9 @@ namespace mee{
}
//TODO: If for some reason the goalNumber is not 1 throw an error
if(goalNumber != 1){
}
//Return the list of factors
return factors;
@@ -155,6 +158,9 @@ namespace mee{
}
//TODO: If for some reason the goalNumber is not 1 throw an error
if(goalNumber != 1){
}
//Return the list of factors
return factors;
@@ -186,6 +192,9 @@ namespace mee{
}
//TODO: If for some reason the goalNumber is not 1 throw an error
if(goalNumber != 1){
}
//Return the list of factors
return factors;

View File

@@ -22,7 +22,7 @@ Copyright (C) 2020 Matthew Ellison
namespace mee{
public class Stopwatch{
//Variables
private System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); //The stopwatch that is used
private readonly System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); //The stopwatch that is used
private enum TIME_RESOLUTION{ NANOSECOND, MICROSECOND, MILLISECOND, SECOND, MINUTE, HOUR, ERROR };
private const int NUM_TO_RUN = 100000;
private readonly long nanosecPerTick = 1000000000L / System.Diagnostics.Stopwatch.Frequency;
@@ -30,10 +30,6 @@ namespace mee{
//Constructor makes sure all values are set to defaults
public 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(){
return stopwatch.ElapsedTicks;
}
//Simultates starting a stopwatch
public void Start(){
stopwatch.Start();
@@ -121,7 +117,7 @@ namespace mee{
}
//Tests
public static void Main(string[] args){
public static void Main(){
System.Console.WriteLine("Testing start/stop");
TestStartStop();
System.Console.WriteLine("start/stop completed successfully");