mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-22 05:15:51 +12:00
Add external libraries
This commit is contained in:
parent
70f443b06e
commit
e8dc11cc31
17 changed files with 2010 additions and 0 deletions
31
third_party/open-bp-cpp/include/log.h
vendored
Normal file
31
third_party/open-bp-cpp/include/log.h
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include <fstream>
|
||||
#include <vector>
|
||||
#include <chrono>
|
||||
|
||||
class RequestQueue {
|
||||
public:
|
||||
unsigned int id = 1;
|
||||
std::string requestType;
|
||||
};
|
||||
|
||||
class Logger {
|
||||
public:
|
||||
Logger() {
|
||||
start = std::chrono::system_clock::now();
|
||||
}
|
||||
|
||||
~Logger() {
|
||||
logFile.close();
|
||||
}
|
||||
|
||||
void init(std::string filename);
|
||||
void logSentMessage(std::string rqType, unsigned int id);
|
||||
void logReceivedMessage(std::string repType, unsigned int id);
|
||||
|
||||
private:
|
||||
std::fstream logFile;
|
||||
std::vector<RequestQueue> rQueue;
|
||||
|
||||
// Using time point and system_clock
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue