mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
fix: regression
fixes regression caused by previous pr Related-To: NEO-8116 Signed-off-by: Oskar Hubert Weber <oskar.hubert.weber@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
95b3d16d76
commit
435b6f8e28
@@ -67,9 +67,7 @@ bool checkDefaultCacheDirSettings(std::string &cacheDir, NEO::EnvironmentVariabl
|
||||
}
|
||||
|
||||
time_t getFileModificationTime(const std::string &path) {
|
||||
struct stat st {
|
||||
0, 0
|
||||
};
|
||||
struct stat st {};
|
||||
if (NEO::SysCalls::stat(path, &st) == 0) {
|
||||
return st.st_mtime;
|
||||
}
|
||||
@@ -77,9 +75,7 @@ time_t getFileModificationTime(const std::string &path) {
|
||||
}
|
||||
|
||||
size_t getFileSize(const std::string &path) {
|
||||
struct stat st {
|
||||
0, 0
|
||||
};
|
||||
struct stat st {};
|
||||
if (NEO::SysCalls::stat(path, &st) == 0) {
|
||||
return static_cast<size_t>(st.st_size);
|
||||
}
|
||||
|
||||
@@ -29,10 +29,7 @@ OSTimeLinux::OSTimeLinux(OSInterface &osInterface, std::unique_ptr<DeviceTime> d
|
||||
}
|
||||
|
||||
bool OSTimeLinux::getCpuTime(uint64_t *timestamp) {
|
||||
struct timespec ts {
|
||||
0, 0
|
||||
};
|
||||
|
||||
struct timespec ts {};
|
||||
if (getTimeFunc(CLOCK_MONOTONIC_RAW, &ts)) {
|
||||
return false;
|
||||
}
|
||||
@@ -43,9 +40,7 @@ bool OSTimeLinux::getCpuTime(uint64_t *timestamp) {
|
||||
}
|
||||
|
||||
bool OSTime::getCpuTimeHost(uint64_t *timestamp) {
|
||||
struct timespec ts {
|
||||
0, 0
|
||||
};
|
||||
struct timespec ts {};
|
||||
|
||||
auto ret = clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
|
||||
|
||||
@@ -55,9 +50,7 @@ bool OSTime::getCpuTimeHost(uint64_t *timestamp) {
|
||||
}
|
||||
|
||||
double OSTimeLinux::getHostTimerResolution() const {
|
||||
struct timespec ts {
|
||||
0, 0
|
||||
};
|
||||
struct timespec ts {};
|
||||
if (resolutionFunc(CLOCK_MONOTONIC_RAW, &ts)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user