Positive input is sleep time in microseconds. Negative input is fractions * of microseconds, i.e. -10 means 100 nanoseconds. */
| 2211 | /* Positive input is sleep time in microseconds. Negative input is fractions |
| 2212 | * of microseconds, i.e. -10 means 100 nanoseconds. */ |
| 2213 | void debugDelay(int usec) { |
| 2214 | /* Since even the shortest sleep results in context switch and system call, |
| 2215 | * the way we achive short sleeps is by statistically sleeping less often. */ |
| 2216 | if (usec < 0) usec = (rand() % -usec) == 0 ? 1: 0; |
| 2217 | if (usec) usleep(usec); |
| 2218 | } |
no outgoing calls
no test coverage detected