Merge pull request #5567 from lioncash/put_time
Movie: Use std::put_time in GetRTCDisplay()
This commit is contained in:
commit
3a83ebcc35
|
@ -7,10 +7,12 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
#include <iomanip>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <mbedtls/config.h>
|
#include <mbedtls/config.h>
|
||||||
#include <mbedtls/md.h>
|
#include <mbedtls/md.h>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
#include <sstream>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
|
@ -187,13 +189,13 @@ std::string GetInputDisplay()
|
||||||
// NOTE: GPU Thread
|
// NOTE: GPU Thread
|
||||||
std::string GetRTCDisplay()
|
std::string GetRTCDisplay()
|
||||||
{
|
{
|
||||||
time_t current_time =
|
using ExpansionInterface::CEXIIPL;
|
||||||
ExpansionInterface::CEXIIPL::GetEmulatedTime(ExpansionInterface::CEXIIPL::UNIX_EPOCH);
|
|
||||||
tm* gm_time = gmtime(¤t_time);
|
const time_t current_time = CEXIIPL::GetEmulatedTime(CEXIIPL::UNIX_EPOCH);
|
||||||
char buffer[256];
|
const tm* const gm_time = gmtime(¤t_time);
|
||||||
strftime(buffer, sizeof(buffer), "Date/Time: %c\n", gm_time);
|
|
||||||
std::stringstream format_time;
|
std::stringstream format_time;
|
||||||
format_time << buffer;
|
format_time << std::put_time(gm_time, "Date/Time: %c\n");
|
||||||
return format_time.str();
|
return format_time.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue