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)

static TimerTask timerTask(final O r, final java.util.Timer timer) {
  ret new TimerTask {
    public void run() {
      ifdef timerTask_verbose
        print("timerTask: licensed=" + licensed());
      endifdef
      if (!licensed())
        timer.cancel();
      else
        pcallF(r);
    }
  };
}

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: 574 / 593
Version history: 3 change(s)
Referenced in: [show references]