| 36 | namespace framework |
| 37 | { |
| 38 | void sleep_in_seconds(float seconds) |
| 39 | { |
| 40 | // Early return on non-positive input |
| 41 | if (seconds <= 0.f) |
| 42 | { |
| 43 | return; |
| 44 | } |
| 45 | |
| 46 | #ifndef NO_MULTI_THREADING |
| 47 | const int64_t us = static_cast<int64_t>(seconds * 1e6); |
| 48 | std::this_thread::sleep_for(std::chrono::microseconds(us)); |
| 49 | #endif /* NO_MULTI_THREADING */ |
| 50 | } |
| 51 | } // namespace framework |
| 52 | } // namespace test |
| 53 | } // namespace arm_compute |