Update to use Libraries and fix include order

This commit is contained in:
2020-03-07 14:46:26 +01:00
parent 3b7491f57d
commit 157b1ceb51
32 changed files with 114 additions and 1405 deletions
+9 -12
View File
@@ -1,14 +1,12 @@
#include <iostream>
#include <string>
#include <memory>
#include <algorithm>
#include "Util/INIh.h"
#include <Timer.h>
#include <unistd.h>
#include <algorithm>
#include <chrono>
#include <deque>
#include "Util/Timer.h"
#include "Util/INIh.h"
#include <iostream>
#include <memory>
#include <string>
void print()
@@ -18,7 +16,7 @@ void print()
void TestTimerAbort()
{
PresenceDetection::Util::Timer timer;
Timer::Timer timer;
std::function<void()> f_print = print;
std::cout << "---" << std::endl;
@@ -51,7 +49,7 @@ void TestTimerAbort()
std::cout << "---" << std::endl << std::endl;
}
typedef std::unique_ptr<PresenceDetection::Util::Timer> Pointer;
typedef std::unique_ptr<Timer::Timer> Pointer;
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args) {
@@ -70,7 +68,7 @@ void StartNewTimer(std::deque<Pointer>& timers)
int id(10);
// Protect!
auto timer = make_unique<PresenceDetection::Util::Timer>();
auto timer = make_unique<Timer::Timer>();
timer->StartSingle(delay, static_cast<std::function<void(const std::string&, int)>>(std::bind(&OnTimerEnd, std::placeholders::_1, std::placeholders::_2)), identifier, id);
timers.push_back(std::move(timer));
}
@@ -123,4 +121,3 @@ int main(int /*argc*/, char** /*argv[]*/)
return 0;
}