// 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;
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 '~~~~'
java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org