fix: don't sleep in ULTs

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-06-17 13:14:04 +00:00
committed by Compute-Runtime-Automation
parent c40f0f2421
commit 90ecbd65ef
2 changed files with 3 additions and 6 deletions

View File

@@ -33,8 +33,6 @@ TEST(MockOSTime, WhenSleepingThenDeviceAndHostTimerAreIncreased) {
&deviceTimestamp[0],
&hostTimestamp[0]);
std::this_thread::sleep_for(std::chrono::nanoseconds(1000));
mDev->getDeviceAndHostTimer(
&deviceTimestamp[1],
&hostTimestamp[1]);
@@ -99,8 +97,6 @@ TEST(MockOSTime, WhenSleepingThenHostTimerIsIncreased) {
mDev->getHostTimer(
&hostTimestamp[0]);
std::this_thread::sleep_for(std::chrono::nanoseconds(1000));
mDev->getHostTimer(
&hostTimestamp[1]);

View File

@@ -9,6 +9,7 @@
#include "shared/source/command_stream/command_stream_receiver.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/helpers/sleep.h"
#include "shared/source/os_interface/os_context.h"
#include "shared/source/os_interface/os_thread.h"
#include "shared/source/os_interface/product_helper.h"
@@ -151,7 +152,7 @@ void DirectSubmissionController::checkNewSubmissions() {
}
void DirectSubmissionController::sleep() {
std::this_thread::sleep_for(std::chrono::microseconds(this->timeout));
NEO::sleep(std::chrono::microseconds(this->timeout));
}
SteadyClock::time_point DirectSubmissionController::getCpuTimestamp() {
@@ -185,4 +186,4 @@ void DirectSubmissionController::recalculateTimeout() {
this->lastTerminateCpuTimestamp = now;
}
} // namespace NEO
} // namespace NEO