Initial setup for CLion
This commit is contained in:
22
engines/OpenVINOEngine/src/monitors/query_wrapper.cpp
Normal file
22
engines/OpenVINOEngine/src/monitors/query_wrapper.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright (C) 2019-2024 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "query_wrapper.h"
|
||||
|
||||
#include <Windows.h>
|
||||
#include <system_error>
|
||||
|
||||
QueryWrapper::QueryWrapper() {
|
||||
PDH_STATUS status = PdhOpenQuery(NULL, NULL, &query);
|
||||
if (ERROR_SUCCESS != status) {
|
||||
throw std::system_error(status, std::system_category(), "PdhOpenQuery() failed");
|
||||
}
|
||||
}
|
||||
QueryWrapper::~QueryWrapper() {
|
||||
PdhCloseQuery(query);
|
||||
}
|
||||
|
||||
QueryWrapper::operator PDH_HQUERY() const {
|
||||
return query;
|
||||
}
|
||||
Reference in New Issue
Block a user