version 2.33.0
piMinSleep() method
This commit is contained in:
@@ -402,7 +402,7 @@ bool PIThread::waitForFinish(int timeout_msecs) {
|
||||
if (!running_) return true;
|
||||
if (timeout_msecs < 0) {
|
||||
while (running_) {
|
||||
piMSleep(PIP_MIN_MSLEEP);
|
||||
piMinSleep();
|
||||
#ifdef WINDOWS
|
||||
if (!isExists(PRIVATE->thread)) {
|
||||
unlock();
|
||||
@@ -414,7 +414,7 @@ bool PIThread::waitForFinish(int timeout_msecs) {
|
||||
}
|
||||
tmf_.reset();
|
||||
while (running_ && tmf_.elapsed_m() < timeout_msecs) {
|
||||
piMSleep(PIP_MIN_MSLEEP);
|
||||
piMinSleep();
|
||||
#ifdef WINDOWS
|
||||
if (!isExists(PRIVATE->thread)) {
|
||||
unlock();
|
||||
@@ -430,12 +430,12 @@ bool PIThread::waitForStart(int timeout_msecs) {
|
||||
if (running_) return true;
|
||||
if (timeout_msecs < 0) {
|
||||
while (!running_)
|
||||
piMSleep(PIP_MIN_MSLEEP);
|
||||
piMinSleep();
|
||||
return true;
|
||||
}
|
||||
tms_.reset();
|
||||
while (!running_ && tms_.elapsed_m() < timeout_msecs)
|
||||
piMSleep(PIP_MIN_MSLEEP);
|
||||
piMinSleep();
|
||||
return tms_.elapsed_m() < timeout_msecs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user