mirror of
https://github.com/lifegpc/c-utils.git
synced 2026-06-06 05:08:45 +08:00
Update
This commit is contained in:
14
time_util.cpp
Normal file
14
time_util.cpp
Normal 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
|
||||
Reference in New Issue
Block a user