mirror of
https://bitbucket.org/Mattrixwv/csclasses.git
synced 2025-12-06 18:23:58 -05:00
Updated to fix some warnings
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user