mirror of
https://bitbucket.org/Mattrixwv/projecteulercpp.git
synced 2025-12-06 17:13:59 -05:00
Updated to use new solve checking function
This commit is contained in:
@@ -55,18 +55,12 @@ public:
|
|||||||
}
|
}
|
||||||
//Get the time it took to run the algorithm as a string
|
//Get the time it took to run the algorithm as a string
|
||||||
virtual std::string getTime(){
|
virtual std::string getTime(){
|
||||||
//If the problem hasn't been solved throw an exception
|
solvedCheck("time it took to run the algorithm");
|
||||||
if(!solved){
|
|
||||||
throw Unsolved();
|
|
||||||
}
|
|
||||||
return timer.getStr();
|
return timer.getStr();
|
||||||
}
|
}
|
||||||
//Get a copy of the timer that was used to time the algorithm
|
//Get a copy of the timer that was used to time the algorithm
|
||||||
virtual mee::Stopwatch getTimer(){
|
virtual mee::Stopwatch getTimer(){
|
||||||
//If the problem hasn't been solved throw an exception
|
solvedCheck("timer");
|
||||||
if(!solved){
|
|
||||||
throw Unsolved();
|
|
||||||
}
|
|
||||||
return timer;
|
return timer;
|
||||||
}
|
}
|
||||||
//Reset the problem so it can be run again
|
//Reset the problem so it can be run again
|
||||||
|
|||||||
Reference in New Issue
Block a user