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

7
LINES

< > BotCompany Repo | #1030834 // stepAllWithTimeout

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

Libraryless. Click here for Pure Java version (2728L/16K).

1  
svoid stepAllWithTimeout(double timeout, Steppable s) {
2  
  if (s == null) ret;
3  
  long endTime = sysNow()+toMS(timeout);
4  
  do {
5  
    ping();
6  
  } while (s.step() && sysNow() < endTime);
7  
}

Author comment

Began life as a copy of #1030477

download  show line numbers  debug dex  old transpilations   

Travelled to 5 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030834
Snippet name: stepAllWithTimeout
Eternal ID of this version: #1030834/1
Text MD5: 13c4ddefa61d0ab64357fbb0ec5b23ea
Transpilation MD5: 70dc6dc538f6d3c4dcb771a2491f2968
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-04-01 16:56:48
Source code size: 191 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 218 / 315
Referenced in: [show references]