src/utils/Timer.cpp
raw| 1 | /* |
| 2 | * Copyright (C) 2014-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 | #include "Timer.h" |
| 9 | |
| 10 | using namespace LIBRETRO; |
| 11 | |
| 12 | uint64_t Timer::microseconds() |
| 13 | { |
| 14 | const auto currenttime = m_clock.now().time_since_epoch(); |
| 15 | return std::chrono::duration_cast<std::chrono::microseconds>(currenttime).count(); |
| 16 | } |