Allow compiler-level declarations for the thread timers
We use a #define here to set these up - if you define them via a -D block yourself, you can adjust these as you require.
This commit is contained in:
@@ -13,12 +13,21 @@
|
|||||||
|
|
||||||
#include "state.hpp"
|
#include "state.hpp"
|
||||||
|
|
||||||
|
#ifndef THREAD_PAUSE_MS
|
||||||
|
#define THREAD_PAUSE_MS 1000
|
||||||
|
#endif
|
||||||
|
#ifndef THREAD_GENERAL_MS
|
||||||
|
#define THREAD_GENERAL_MS 10
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace cw::worker
|
namespace cw::worker
|
||||||
{
|
{
|
||||||
using cw::node::NodeAllocator;
|
using cw::node::NodeAllocator;
|
||||||
using cw::state::State;
|
using cw::state::State;
|
||||||
constexpr auto THREAD_PAUSE_DELAY = std::chrono::milliseconds(1000);
|
constexpr auto THREAD_PAUSE_DELAY =
|
||||||
constexpr auto THREAD_GENERAL_DELAY = std::chrono::milliseconds(10);
|
std::chrono::milliseconds(THREAD_PAUSE_MS);
|
||||||
|
constexpr auto THREAD_GENERAL_DELAY =
|
||||||
|
std::chrono::milliseconds(THREAD_GENERAL_MS);
|
||||||
|
|
||||||
// Performs a single iteration which consists of the following:
|
// Performs a single iteration which consists of the following:
|
||||||
// 1) pop an index off the iteration queue
|
// 1) pop an index off the iteration queue
|
||||||
|
|||||||
Reference in New Issue
Block a user