mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 00:59:44 +00:00
Common: Add utility function that wraps localtime_s() or localtime_t().
This commit is contained in:
parent
982ad93355
commit
52410813f2
4 changed files with 41 additions and 0 deletions
13
Source/Core/Common/TimeUtil.h
Normal file
13
Source/Core/Common/TimeUtil.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Copyright 2024 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ctime>
|
||||
#include <optional>
|
||||
|
||||
namespace Common
|
||||
{
|
||||
// Threadsafe and error-checking variant of std::localtime()
|
||||
std::optional<std::tm> Localtime(std::time_t time);
|
||||
} // Namespace Common
|
Loading…
Add table
Add a link
Reference in a new issue