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   

Travelled to 11 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

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