Add external libraries

This commit is contained in:
sylvieee-iot 2024-05-02 20:28:41 +03:00 committed by GitHub
parent 70f443b06e
commit e8dc11cc31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 2010 additions and 0 deletions

20
third_party/open-bp-cpp/source/log.cpp vendored Normal file
View file

@ -0,0 +1,20 @@
#include "../include/log.h"
void Logger::init(std::string filename) {
logFile.open(filename, std::fstream::out);
}
void Logger::logSentMessage(std::string rqType, unsigned int id) {
end = std::chrono::system_clock::now();
std::chrono::duration<double> elapsed_seconds = end - start;
RequestQueue tempQ;
tempQ.id = id;
tempQ.requestType = rqType;
rQueue.push_back(tempQ);
logFile << elapsed_seconds.count() << " s, Request type sent: " << rqType << ", ID: " << id << std::endl;
}
void Logger::logReceivedMessage(std::string repType, unsigned int id) {
//end = std::chrono::system_clock::now();
}