chore(util/thread): do not import chrono twice
This commit is contained in:
parent
2927a869b0
commit
570d905282
1 changed files with 6 additions and 4 deletions
|
|
@ -6,21 +6,25 @@ Author: Leonardo de Moura
|
|||
*/
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
|
||||
#ifndef LEAN_STACK_BUFFER_SPACE
|
||||
#define LEAN_STACK_BUFFER_SPACE 128*1024 // 128 Kb
|
||||
#endif
|
||||
|
||||
namespace lean {
|
||||
namespace chrono = std::chrono;
|
||||
};
|
||||
|
||||
#if defined(LEAN_MULTI_THREAD)
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <atomic>
|
||||
#include <condition_variable>
|
||||
#define LEAN_THREAD_LOCAL thread_local
|
||||
#include <chrono>
|
||||
|
||||
namespace lean {
|
||||
namespace chrono = std::chrono;
|
||||
using std::thread;
|
||||
using std::mutex;
|
||||
using std::recursive_mutex;
|
||||
|
|
@ -61,10 +65,8 @@ public:
|
|||
// NO MULTI THREADING SUPPORT
|
||||
#include <utility>
|
||||
#include <cstdlib>
|
||||
#include <chrono> // NOLINT
|
||||
#define LEAN_THREAD_LOCAL
|
||||
namespace lean {
|
||||
namespace chrono = std::chrono;
|
||||
constexpr int memory_order_relaxed = 0;
|
||||
constexpr int memory_order_release = 0;
|
||||
constexpr int memory_order_acquire = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue