| 1 |
/* |
| 2 |
* Copyright (C) 2018-2021 Team Kodi (https://kodi.tv) |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 5 |
* See LICENSE.md for more information. |
| 6 |
*/ |
| 7 |
|
| 8 |
#pragma once |
| 9 |
|
| 10 |
#include <chrono> |
| 11 |
#include <cstdint> |
| 12 |
|
| 13 |
namespace LIBRETRO |
| 14 |
{ |
| 15 |
/*! |
| 16 |
* \brief Utility to get the current time. |
| 17 |
*/ |
| 18 |
class Timer |
| 19 |
{ |
| 20 |
public: |
| 21 |
/*! |
| 22 |
* \brief Returns current time in microseconds. |
| 23 |
*/ |
| 24 |
uint64_t microseconds(); |
| 25 |
|
| 26 |
private: |
| 27 |
std::chrono::high_resolution_clock m_clock; |
| 28 |
}; |
| 29 |
} |