MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / microTask

Function microTask

src/test/scheduler_tests.cpp:16–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14BOOST_AUTO_TEST_SUITE(scheduler_tests)
15
16static void microTask(CScheduler& s, boost::mutex& mutex, int& counter, int delta, boost::chrono::system_clock::time_point rescheduleTime)
17{
18 {
19 boost::unique_lock<boost::mutex> lock(mutex);
20 counter += delta;
21 }
22 boost::chrono::system_clock::time_point noTime = boost::chrono::system_clock::time_point::min();
23 if (rescheduleTime != noTime) {
24 CScheduler::Function f = boost::bind(&microTask, boost::ref(s), boost::ref(mutex), boost::ref(counter), -delta + 1, noTime);
25 s.schedule(f, rescheduleTime);
26 }
27}
28
29static void MicroSleep(uint64_t n)
30{

Callers

nothing calls this directly

Calls 1

scheduleMethod · 0.80

Tested by

no test coverage detected