i lurk
If you need instructions on how to get through the hotels, check out the enclosed instruction book.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
local x = os.clock()
local s = 0 for i=1,100000 do s = s + i end
[COLOR=#FF0000]XXXXX[/COLOR](string.format("User ID: %.2f\n", os.clock() - x))
typedef unsigned __int64 u64;
double mNanoSecondsPerCount;
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
int prevInit = 0; int currInit = 0;
u64 prevTime = 0; u64 currTime = 0;
u64 FrequencyCountPerSec;
LARGE_INTEGER frequencyTemp;
static int readHiResTimerFrequency(lua_State *L) { QueryPerformanceFrequency(&frequencyTemp);
FrequencyCountPerSec = frequencyTemp.QuadPart;
lua_pushnumber(L, frequencyTemp.QuadPart);
return 1;
}
LARGE_INTEGER timerTemp;
static int storeTime(lua_State *L)
{
QueryPerformanceCounter(&timerTemp);
if(!prevInit)
{
prevInit = 1;
prevTime = timerTemp.QuadPart;
}
else if (!currInit)
{
currInit = 1;
currTime = timerTemp.QuadPart;
}
else
{
prevTime = currTime;
currTime = timerTemp.QuadPart;
}
lua_pushnumber(L, timerTemp.QuadPart);
return 1;
}
static int getNanoElapsed(lua_State *L)
{
double mNanoSecondsPerCount = 1000000000/(double)FrequencyCountPerSec;
double elapsedNano = (currTime - prevTime)*mNanoSecondsPerCount;
lua_pushnumber(L, elapsedNano);
return 1;
}
int luaopen_HighResolutionTimer (lua_State *L)
{
static const luaL_reg mylib [] =
{
{"readHiResTimerFrequency", readHiResTimerFrequency},{"storeTime", storeTime}, {"getNanoElapsed", getNanoElapsed},
{NULL, NULL}
/* sentinel */
};
luaL_register(L,"timer",mylib);
return 1;
}
require './HighResTimer'
start();
for i = 0, 3000000 do io.write("")
end
--do essentially nothing 3million times.
stop();
--divide nanoseconds by 1 million to get milliseconds
executionTime = getNanosElapsed()/1000000; io.write("playerID: ", executionTime, "ms\n");
Quote from: Thor;1903710It's losing subscribers very quickly. Subscriptions peaked near released and have been going down ever since.
People are leaving because servers are empty at this point. It's Warhammer Online all over again
EDIT: Indecently, EA just gave a free month subscription to anybody with a level 50 character who is currently subscribed. Does that sound like the actions of a company confident in its ability to maintain subscribers?