Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
scheduler.cpp
Go to the documentation of this file.
27 // Creating the posix_time using from_time_t loses sub-second precision. So rather than exporting the time_point to time_t,
28 // start with a posix_time at the epoch (0) and add the milliseconds that have passed since then.
29 return boost::posix_time::from_time_t(0) + boost::posix_time::milliseconds(boost::chrono::duration_cast<boost::chrono::milliseconds>(t.time_since_epoch()).count());
117 schedule(f, boost::chrono::system_clock::now() + boost::chrono::milliseconds(deltaMilliSeconds));
177 explicit RAIICallbacksRunning(SingleThreadedSchedulerClient* _instance) : instance(_instance) {}
Class used by CScheduler clients which may schedule multiple jobs which are required to be run serial...
Definition: scheduler.h:93
void RandAddSeedSleep()
Add a little bit of randomness to the output of GetStrongRangBytes.
Definition: random.cpp:282
std::multimap< boost::chrono::system_clock::time_point, Function > taskQueue
Definition: scheduler.h:78
void MaybeScheduleProcessQueue()
Definition: scheduler.cpp:149
void scheduleEvery(Function f, int64_t deltaMilliSeconds)
Definition: scheduler.cpp:126
void scheduleFromNow(Function f, int64_t deltaMilliSeconds)
Definition: scheduler.cpp:115
void schedule(Function f, boost::chrono::system_clock::time_point t=boost::chrono::system_clock::now())
Definition: scheduler.cpp:106
static void Repeat(CScheduler *s, CScheduler::Function f, int64_t deltaMilliSeconds)
Definition: scheduler.cpp:120
static boost::system_time toPosixTime(const boost::chrono::system_clock::time_point &t)
Definition: scheduler.cpp:25
bool m_are_callbacks_running
Definition: scheduler.h:99
std::list< std::function< void(void)> > m_callbacks_pending
Definition: scheduler.h:98
size_t CallbacksPending()
Definition: scheduler.cpp:210
CCriticalSection m_cs_callbacks_pending
Definition: scheduler.h:97
bool AreThreadsServicingQueue() const
Definition: scheduler.cpp:143
size_t getQueueInfo(boost::chrono::system_clock::time_point &first, boost::chrono::system_clock::time_point &last) const
Definition: scheduler.cpp:131
Definition: scheduler.h:37
void AddToProcessQueue(std::function< void(void)> func)
Definition: scheduler.cpp:190