1 | static volatile long gc_notTooOften_last; |
2 | static volatile long gc_notTooOften_interval = 1000; |
3 | |
4 | static void gc_notTooOften() { |
5 | gc_notTooOften_last = fixTimestamp(gc_notTooOften_last); |
6 | if (now() >= gc_notTooOften_last + gc_notTooOften_interval) { |
7 | gc(); |
8 | gc_notTooOften_last = now(); |
9 | } |
10 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006309 |
Snippet name: | gc_notTooOften - don't run more than once a second; very important for timers under hibernation! |
Eternal ID of this version: | #1006309/1 |
Text MD5: | 117e5205ccf5f4f87da98e523221cc9e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-28 17:20:04 |
Source code size: | 307 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 490 / 489 |
Referenced in: | [show references] |