Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double current_time = 0;
- double last_time = 0;
- int n = 0;
- int fps = 60;
- u64 tick;
- int XT_getFPS(lua_State *L)
- {
- n++;
- sceRtcGetCurrentTick(&tick);
- current_time = tick/1000;
- if ((current_time - last_time) >= 1000)
- {
- fps = n;
- n = 0;
- last_time = current_time;
- }
- lua_pushnumber(L, fps);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement