-
Notifications
You must be signed in to change notification settings - Fork 557
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f0948e
commit a1f51b4
Showing
12 changed files
with
620 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
#ifndef PROCESSOR_H | ||
#define PROCESSOR_H | ||
#include <vector> | ||
#include <string> | ||
|
||
|
||
class Processor { | ||
public: | ||
float Utilization(); // TODO: See src/processor.cpp | ||
float Utilization(); | ||
Processor(); | ||
|
||
// TODO: Declare any necessary private members | ||
// DONE: Declare any necessary private members | ||
private: | ||
static bool IsInitializied_; | ||
float CurrentRunTime_; | ||
float CurrentTotalTime_; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
#include <string> | ||
|
||
#include "format.h" | ||
|
||
#include <string> | ||
|
||
using std::string; | ||
|
||
// TODO: Complete this helper function | ||
// DONE: Complete this helper function | ||
// INPUT: Long int measuring seconds | ||
// OUTPUT: HH:MM:SS | ||
// REMOVE: [[maybe_unused]] once you define the function | ||
string Format::ElapsedTime(long seconds[[maybe_unused]]) { return string(); } | ||
string Format::ElapsedTime(long seconds) { | ||
string elapsedTime; | ||
|
||
elapsedTime = std::to_string(seconds / (60 * 60)) + ":" + | ||
std::to_string((seconds % (60 * 60)) / 60) + ":" + | ||
std::to_string(seconds % 60); | ||
|
||
return elapsedTime; | ||
} |
Oops, something went wrong.