/* * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once #include #include #include namespace NEO { class TimeMeasureWrapper { public: template static decltype(auto) functionExecution(O &&obj, F &&func, Args &&...args) { auto start = std::chrono::system_clock::now(); auto retVal = (obj.*func)(std::forward(args)...); auto end = std::chrono::system_clock::now(); std::chrono::duration elapsedTime = end - start; std::cout << "Elapsed time: " << elapsedTime.count() << "\n"; return retVal; } }; }; // namespace NEO