Advertisement
h31ix

Untitled

Mar 30th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. public static double getTPS(int ticks)
  2. {
  3. if (TickCount < ticks) {
  4. return 20.0D;
  5. }
  6. int target = (TickCount - 1 - ticks) % Ticks.length;
  7. long elapsed = System.currentTimeMillis() - Ticks[target];
  8.  
  9. return ticks / (elapsed / 1000.0D);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement