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