Time

xiaoxiao2021-03-06  39

Void TimettosystemTime (TIME_T T, LPSYSTEMTIME PST) {FileTime FT;

Longlong ll = int32x32to64 (t, 10000000) 11644736000000000; ft.dwlowdatetime = (dword) ll; ft.dwhighdatetime = (dword) (LL >> 32);

FiletimetosystemTime (& ft, pst);

Void SystemTimeTotimet (SystemTime St, Time_T * Pt) {Filetime Ft; SystemTimetOfiletime (& St, & ft);

Longlong LL;

Ularge_integer ui; ui.lowpart = ft.dwlowdatetime; ui.highpart = ft.dwhighdatetime;

LL = (ft.dwhighdatetime << 32) ft.dwlowdatetime;

* Pt = (DWORD) ((longlong) (UI.quadpart - 116444736000000000) / 10000000);

转载请注明原文地址:https://www.9cbs.com/read-69438.html

New Post(0)