| 78 | |
| 79 | |
| 80 | void Wait() |
| 81 | { |
| 82 | if (ErrHandler.UserBreak) |
| 83 | ErrHandler.Exit(RARX_USERBREAK); |
| 84 | #if defined(_WIN_ALL) && !defined(SFX_MODULE) |
| 85 | if (SleepTime!=0) |
| 86 | { |
| 87 | static clock_t LastTime=MonoClock(); |
| 88 | if (MonoClock()-LastTime>10*CLOCKS_PER_SEC/1000) |
| 89 | { |
| 90 | Sleep(SleepTime); |
| 91 | LastTime=MonoClock(); |
| 92 | } |
| 93 | } |
| 94 | #endif |
| 95 | #if defined(_WIN_ALL) |
| 96 | // Reset system sleep timer to prevent system going sleep. |
| 97 | SetThreadExecutionState(ES_SYSTEM_REQUIRED); |
| 98 | #endif |
| 99 | } |
| 100 | |
| 101 | |
| 102 |
no test coverage detected