?? fps.java
字號:
/*
* class used to obtain frame rate
*/
public class FPS
{
public static int fps = 10;
private int count_fps;
private String fps_string;
private long last;
public FPS()
{
fps = 10;
count_fps = 0;
}
public void calculateFps()
{
count_fps++;
long n = System.currentTimeMillis() / 1000L;
if(n != last)
{
fps = count_fps;
count_fps = 0;
fps_string = "Fps:" + fps;
last = n;
}
}
public String getFpsString()
{
return fps_string;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -