MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / PeekSleep

Method PeekSleep

source/src/interpreter.cpp:77–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77bool QiInterpreter::PeekSleep(clock_t ms)
78{
79 clock_t end = clock() + (ms / speed);
80 if (ms > 5)
81 {
82 while (!worker.m_stop && (clock() < end)) std::this_thread::sleep_for(std::chrono::milliseconds(1));
83 }
84 else
85 {
86 while (!worker.m_stop && (clock() < end)) std::this_thread::yield();
87 }
88 return worker.m_stop;
89}
90
91QString QiInterpreter::makePath()
92{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected