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

8
LINES

< > TinyBrain | #1006289 - timedGC - gc() and show when and the time taken

JavaX fragment (include)

static int timedGC_minPrint = 1000; // print notice to console when GC takes longer than these many ms

static void timedGC() {
  long time = sysNow(), start = now();
  gc_notTooOften();
  done2_systemErr_minPrint = timedGC_minPrint;
  done2_systemErr(time, "GC " + hmsWithColons(start));
}

download  show line numbers  debug dex   

Travelled to 3 computer(s): cfunsshuasjs, sawdedvomwva, tvejysmllsmz

No comments. add comment

Snippet ID: #1006289
Snippet name: timedGC - gc() and show when and the time taken
Eternal ID of this version: #1006289/3
Text MD5: 00bb890f0373aff2d7b89a8d961717cb
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-04-21 00:28:04
Source code size: 297 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 69 / 41
Version history: 2 change(s)
Referenced in: [show]