Fixed tabs vs spaces indentations (#157)

This commit is contained in:
Jan Chaloupecky
2019-03-15 15:29:10 +00:00
committed by Jason Watkins
parent 50335c4a5c
commit 90ccec0d07
8 changed files with 137 additions and 137 deletions

View File

@@ -5,23 +5,23 @@
using namespace std;
namespace XPC {
void Timer::start(const chrono::milliseconds interval, const Callback &callback) {
{
running.test_and_set();
th = thread([=]()
{
while (running.test_and_set()) {
this_thread::sleep_for(interval);
callback();
}
});
}
}
void Timer::stop() {
running.clear();
if(th.joinable()) {
th.join();
}
}
void Timer::start(const chrono::milliseconds interval, const Callback &callback) {
{
running.test_and_set();
th = thread([=]()
{
while (running.test_and_set()) {
this_thread::sleep_for(interval);
callback();
}
});
}
}
void Timer::stop() {
running.clear();
if(th.joinable()) {
th.join();
}
}
}