MCPcopy Create free account
hub / github.com/Tencent/UnLua / timeout_gettime

Function timeout_gettime

Plugins/UnLuaExtensions/LuaSocket/Source/src/timeout.cpp:124–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122\*-------------------------------------------------------------------------*/
123#ifdef _WIN32
124double timeout_gettime(void) {
125 FILETIME ft;
126 double t;
127 GetSystemTimeAsFileTime(&ft);
128 /* Windows file time (time since January 1, 1601 (UTC)) */
129 t = ft.dwLowDateTime/1.0e7 + ft.dwHighDateTime*(4294967296.0/1.0e7);
130 /* convert to Unix Epoch time (time since January 1, 1970 (UTC)) */
131 return (t - 11644473600.0);
132}
133#else
134double timeout_gettime(void) {
135 struct timeval v;

Callers 9

buffer_initFunction · 0.85
buffer_meth_getstatsFunction · 0.85
buffer_meth_setstatsFunction · 0.85
buffer_meth_sendFunction · 0.85
buffer_meth_receiveFunction · 0.85
timeout_getFunction · 0.85
timeout_getretryFunction · 0.85
timeout_markstartFunction · 0.85
timeout_lua_gettimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected