mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 13:03:01 +08:00
Add System::get_current_date_time()
This commit is contained in:
parent
72812b7950
commit
ac2007dcbd
@ -7,6 +7,8 @@
|
||||
|
||||
namespace vcpkg::System
|
||||
{
|
||||
tm get_current_date_time();
|
||||
|
||||
fs::path get_exe_path_of_current_process();
|
||||
|
||||
struct ExitCodeAndOutput
|
||||
|
@ -5,6 +5,15 @@
|
||||
|
||||
namespace vcpkg::System
|
||||
{
|
||||
tm get_current_date_time()
|
||||
{
|
||||
using std::chrono::system_clock;
|
||||
std::time_t now_time = system_clock::to_time_t(system_clock::now());
|
||||
tm parts;
|
||||
localtime_s(&parts, &now_time);
|
||||
return parts;
|
||||
}
|
||||
|
||||
fs::path get_exe_path_of_current_process()
|
||||
{
|
||||
wchar_t buf[_MAX_PATH];
|
||||
|
Loading…
Reference in New Issue
Block a user