Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1033433 - FPSCounter

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5169L/28K).

sclass FPSCounter {
  new Timestamp started;
  double counter;
  
  synchronized void inc() { counter++; }

  synchronized double get() {
    ret doubleRatio(counter, elapsedSeconds(started));
  }
}

Author comment

Began life as a copy of #1006530

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033433
Snippet name: FPSCounter
Eternal ID of this version: #1033433/1
Text MD5: 89056e5b39d80964434baeda021f7d7e
Transpilation MD5: 9bf2139b8b4e83f1abab491a5f875f68
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-27 14:13:31
Source code size: 207 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 12 / 22
Referenced in: [show references]