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

23
LINES

< > BotCompany Repo | #1029640 // rstWithPreDelay - synonym of rstWithDelay

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (7501L) is out of date.

static ReliableSingleThread rstWithPreDelay(int delay, Runnable r) {
  ret rstWithDelay(delay, r);
}



static ReliableSingleThread rstWithPreDelay(double seconds, Runnable r) {
  ret rstWithDelay(seconds, r);
}

static RSTOverQ rstWithPreDelay(double seconds, Q q, Runnable r) {
  ret RSTOverQ(q, new Runnable {
    run {
      print ifdef rstWithPreDelay_debug("Sleeping " + seconds);
      sleepSeconds(seconds);
      print ifdef rstWithPreDelay_debug("Calling " + r);
      callF(r);
      print ifdef rstWithPreDelay_debug("Called " + r);
    }
    
    toString { ret "Sleep " + seconds + "s, then: " + r; }
  });
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1029640
Snippet name: rstWithPreDelay - synonym of rstWithDelay
Eternal ID of this version: #1029640/5
Text MD5: 87859fad3da366567b773ee14291a24c
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-03 16:45:55
Source code size: 644 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 143 / 228
Version history: 4 change(s)
Referenced in: [show references]