mirror of
https://github.com/luau-lang/luau.git
synced 2025-01-19 17:28:06 +00:00
Merge branch 'master' into merge
This commit is contained in:
commit
8c4f9070c5
3 changed files with 5 additions and 5 deletions
|
@ -40,7 +40,7 @@ static double getClockPeriod()
|
||||||
mach_timebase_info_data_t result = {};
|
mach_timebase_info_data_t result = {};
|
||||||
mach_timebase_info(&result);
|
mach_timebase_info(&result);
|
||||||
return double(result.numer) / double(result.denom) * 1e-9;
|
return double(result.numer) / double(result.denom) * 1e-9;
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||||
return 1e-9;
|
return 1e-9;
|
||||||
#else
|
#else
|
||||||
return 1.0 / double(CLOCKS_PER_SEC);
|
return 1.0 / double(CLOCKS_PER_SEC);
|
||||||
|
@ -55,7 +55,7 @@ static double getClockTimestamp()
|
||||||
return double(result.QuadPart);
|
return double(result.QuadPart);
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
return double(mach_absolute_time());
|
return double(mach_absolute_time());
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||||
timespec now;
|
timespec now;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
return now.tv_sec * 1e9 + now.tv_nsec;
|
return now.tv_sec * 1e9 + now.tv_nsec;
|
||||||
|
|
|
@ -30,7 +30,7 @@ static double clock_period()
|
||||||
mach_timebase_info_data_t result = {};
|
mach_timebase_info_data_t result = {};
|
||||||
mach_timebase_info(&result);
|
mach_timebase_info(&result);
|
||||||
return double(result.numer) / double(result.denom) * 1e-9;
|
return double(result.numer) / double(result.denom) * 1e-9;
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||||
return 1e-9;
|
return 1e-9;
|
||||||
#else
|
#else
|
||||||
return 1.0 / double(CLOCKS_PER_SEC);
|
return 1.0 / double(CLOCKS_PER_SEC);
|
||||||
|
@ -45,7 +45,7 @@ static double clock_timestamp()
|
||||||
return double(result.QuadPart);
|
return double(result.QuadPart);
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
return double(mach_absolute_time());
|
return double(mach_absolute_time());
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||||
timespec now;
|
timespec now;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
return now.tv_sec * 1e9 + now.tv_nsec;
|
return now.tv_sec * 1e9 + now.tv_nsec;
|
||||||
|
|
|
@ -217,7 +217,7 @@ typedef struct global_State
|
||||||
lua_ExecutionCallbacks ecb;
|
lua_ExecutionCallbacks ecb;
|
||||||
|
|
||||||
void (*udatagc[LUA_UTAG_LIMIT])(lua_State*, void*); // for each userdata tag, a gc callback to be called immediately before freeing memory
|
void (*udatagc[LUA_UTAG_LIMIT])(lua_State*, void*); // for each userdata tag, a gc callback to be called immediately before freeing memory
|
||||||
Table* udatamt[LUA_LUTAG_LIMIT]; // metatables for tagged userdata
|
Table* udatamt[LUA_UTAG_LIMIT]; // metatables for tagged userdata
|
||||||
|
|
||||||
TString* lightuserdataname[LUA_LUTAG_LIMIT]; // names for tagged lightuserdata
|
TString* lightuserdataname[LUA_LUTAG_LIMIT]; // names for tagged lightuserdata
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue