2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2023-10-18 16:00:43 +08:00
|
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/os_interface/os_time.h"
|
2022-11-24 18:30:57 +08:00
|
|
|
#include "shared/source/os_interface/windows/gfx_escape_wrapper.h"
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/os_interface/windows/windows_wrapper.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
class Wddm;
|
|
|
|
|
|
|
|
class OSTimeWin : public OSTime {
|
|
|
|
|
|
|
|
public:
|
2023-10-18 16:00:43 +08:00
|
|
|
OSTimeWin(OSInterface &osInterface);
|
2017-12-21 07:45:38 +08:00
|
|
|
bool getCpuTime(uint64_t *timeStamp) override;
|
|
|
|
double getHostTimerResolution() const override;
|
|
|
|
uint64_t getCpuRawTimestamp() override;
|
|
|
|
|
2023-10-18 16:00:43 +08:00
|
|
|
static std::unique_ptr<OSTime> create(OSInterface &osInterface);
|
2021-05-28 01:44:47 +08:00
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
protected:
|
|
|
|
LARGE_INTEGER frequency;
|
2018-06-28 13:49:06 +08:00
|
|
|
OSTimeWin() = default;
|
2018-02-19 22:04:03 +08:00
|
|
|
decltype(&QueryPerformanceCounter) QueryPerfomanceCounterFnc = QueryPerformanceCounter;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|