#include <thread>
#include <mutex>
#include <chrono>
#include <condition_variable>
Go to the source code of this file.
Defines | |
#define | COND_WAIT(cond_var, lock_guard, timeout) cond_var.wait_for(lock_guard, baselib_binding::get_duration_secs(timeout)) == std::cv_status::no_timeout |
#define | SLEEP(secs) |
Functions | |
ERROR have you included the definitions for this package in your build | file (eg cmake)?" namespace baselib_binding |
Variables | |
ERROR | __pad1__ |
#define COND_WAIT | ( | cond_var, | |
lock_guard, | |||
timeout | |||
) | cond_var.wait_for(lock_guard, baselib_binding::get_duration_secs(timeout)) == std::cv_status::no_timeout |
#define SLEEP | ( | secs | ) |
{ \ std::this_thread::sleep_for(std::chrono::milliseconds(static_cast<int>(std::floor(secs*1000))));\ }
ERROR have you included the definitions for this package in your build file | ( | eg | cmake | ) |
ERROR __pad1__ |
Macros for switching between thread implementations boost and std c++11.
Copyright (C) 2016 Jennifer Buehler
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA