MCPcopy Create free account
hub / github.com/ddnet/ddnet / filetime_to_unixtime

Function filetime_to_unixtime

src/base/fs.cpp:116–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115#if defined(CONF_FAMILY_WINDOWS)
116static inline time_t filetime_to_unixtime(LPFILETIME filetime)
117{
118 time_t t;
119 ULARGE_INTEGER li;
120 li.LowPart = filetime->dwLowDateTime;
121 li.HighPart = filetime->dwHighDateTime;
122
123 li.QuadPart /= 10000000; // 100ns to 1s
124 li.QuadPart -= 11644473600LL; // Windows epoch is in the past
125
126 t = li.QuadPart;
127 return t == (time_t)li.QuadPart ? t : (time_t)-1;
128}
129#endif
130
131void fs_listdir(const char *dir, FS_LISTDIR_CALLBACK cb, int type, void *user)

Callers 2

fs_listdir_fileinfoFunction · 0.85
fs_file_timeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected