static volatile long gc_notTooOften_last; static volatile long gc_notTooOften_interval = 1000; static void gc_notTooOften() { gc_notTooOften_last = fixTimestamp(gc_notTooOften_last); if (now() >= gc_notTooOften_last + gc_notTooOften_interval) { gc(); gc_notTooOften_last = now(); } }
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: | 699 / 701 |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1015834 - NotTooOften |