Libraryless. Click here for Pure Java version (3598L/20K).
1 | // firstDelay = delay |
2 | static FixedRateTimer doEvery_daemon(S timerName default defaultTimerName(), long delay, final O r) { |
3 | ret doEvery_daemon(timerName, delay, delay, r); |
4 | } |
5 | |
6 | static FixedRateTimer doEvery_daemon(S timerName default defaultTimerName(), long delay, long firstDelay, final O r) { |
7 | FixedRateTimer timer = new(true); |
8 | timer.scheduleAtFixedRate(smartTimerTask(r, timer, delay), firstDelay, delay); |
9 | ret timer; |
10 | } |
11 | |
12 | static FixedRateTimer doEvery_daemon(double delaySeconds, final O r) { |
13 | ret doEvery_daemon(toMS(delaySeconds), r); |
14 | } |
Timers are cancelled automatically when program is delicensed
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: | #1006482 |
Snippet name: | doEvery_daemon - install a java.util.Timer as daemon [not keeping the VM up] |
Eternal ID of this version: | #1006482/7 |
Text MD5: | 544145a27104c1235b0b35e57610a7d3 |
Transpilation MD5: | 4516ee1563c42ad5781e7c6c218bdd55 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-07-02 20:24:57 |
Source code size: | 559 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 608 / 702 |
Version history: | 6 change(s) |
Referenced in: | [show references] |