Sleeps for (roughly) n milli-seconds. This function is only for testing Google Test's own constructs. Don't use it in user tests, either directly or indirectly.
| 2293 | // testing Google Test's own constructs. Don't use it in user tests, |
| 2294 | // either directly or indirectly. |
| 2295 | inline void SleepMilliseconds(int n) { |
| 2296 | const timespec time = { |
| 2297 | 0, // 0 seconds. |
| 2298 | n * 1000L * 1000L, // And n ms. |
| 2299 | }; |
| 2300 | nanosleep(&time, NULL); |
| 2301 | } |
| 2302 | |
| 2303 | // Allows a controller thread to pause execution of newly created |
| 2304 | // threads until notified. Instances of this class must be created |