/
githubmirror
/
yuzu
Обзор
Документация
Войти
/
githubmirror
/
yuzu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/common/steady_clock.h
34 строки
788 B
Morph
steady_clock: Introduce a real time clock
08 мар 2023, 05:17
08 мар 2023, 05:17
6f99185
Код
Авторство
О чём код?
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include <chrono> #include "common/common_types.h" namespace Common { struct SteadyClock { using rep = s64; using period = std::nano; using duration = std::chrono::nanoseconds; using time_point = std::chrono::time_point<SteadyClock>; static constexpr bool is_steady = true; [[nodiscard]] static time_point Now() noexcept; }; struct RealTimeClock { using rep = s64; using period = std::nano; using duration = std::chrono::nanoseconds; using time_point = std::chrono::time_point<RealTimeClock>; static constexpr bool is_steady = false; [[nodiscard]] static time_point Now() noexcept; }; } // namespace Common