This commit is contained in:
2021-12-16 22:13:30 +08:00
parent 751373e0e4
commit 556ab106f4
9 changed files with 345 additions and 2 deletions

14
time_util.cpp Normal file
View File

@@ -0,0 +1,14 @@
#include "time_util.h"
#if _WIN32
#include <Windows.h>
#endif
#if _WIN32
void time_util::time_t_to_file_time(time_t t, LPFILETIME pft) {
ULARGE_INTEGER time_value;
time_value.QuadPart = (t * 10000000LL) + 116444736000000000LL;
pft->dwLowDateTime = time_value.LowPart;
pft->dwHighDateTime = time_value.HighPart;
}
#endif