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

13
LINES

< > BotCompany Repo | #1004684 // timerTask - create TimerTask with automatic cancel on program clean-up

JavaX fragment (include)

1  
static TimerTask timerTask(final O r, final java.util.Timer timer) {
2  
  ret new TimerTask {
3  
    public void run() {
4  
      ifdef timerTask_verbose
5  
        print("timerTask: licensed=" + licensed());
6  
      endifdef
7  
      if (!licensed())
8  
        timer.cancel();
9  
      else
10  
        pcallF(r);
11  
    }
12  
  };
13  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004684
Snippet name: timerTask - create TimerTask with automatic cancel on program clean-up
Eternal ID of this version: #1004684/4
Text MD5: 41bed42fa27c99c834d771ec3123ddab
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-04 20:21:10
Source code size: 313 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 498 / 510
Version history: 3 change(s)
Referenced in: [show references]