// Util.SECOND_NANO is one second in nanoseconds
// Util.timeNano() is like System.currentTimeMillis()
if(Util.timeNano() - lastFPS >= Util.SECOND_NANO)
{
fps = fpsCount;
fpsCount = 0;
lastFPS = Util.timeNano();
// or this lastFPS += Util.SECOND_NANO;
}
fpsCount++;
Special syntax:
To highlight a line (yellow background), prefix it with '@@'
To indicate that a line should be removed (red background), prefix it with '-'
To indicate that a line should be added (green background), prefix it with '+'
To post multiple snippets, seperate them by '~~~~'