Function useful for measuring time (cleo timers are not accurate when the game is lagging, for example when the car speed is very high).
It returns time since PC was started (in milliseconds).
It returns time since PC was started (in milliseconds).
Code:
//0AB1: call_scm_func @GetTickCount 0 _returnedTickCount 31@
:GetTickCount
0AA2: 2@ = load_library "kernel32.dll" // IF and SET
31@ = 0
if 0AA4: 3@ = get_proc_address "GetTickCount" library 2@ // http://www.geoffchappell.com/studies/windows/win32/kernel32/api/index.htm https://msdn.microsoft.com/en-us/library/windows/desktop/ms724408(v=vs.85).aspx
then
0AA7: call_function 3@ num_params 0 pop 0 31@
end
0AA3: free_library 2@
0AB2: ret 1 31@