| 10 | |
| 11 | namespace { |
| 12 | unsigned RandomizeSleepTime(unsigned t) noexcept { |
| 13 | static std::atomic<unsigned> counter = 0; |
| 14 | const unsigned rndNum = IntHash(++counter); |
| 15 | |
| 16 | return (t * 4 + (rndNum % t) * 2) / 5; |
| 17 | } |
| 18 | |
| 19 | // arbitrary values |
| 20 | constexpr unsigned MIN_SLEEP_TIME = 500; |