Libraryless. Click here for Pure Java version (3082L/17K).
1 | svoid repeatForNSeconds_atLeastOnce(double seconds default defaultWarmUpSeconds(), Runnable f) { |
2 | if (f == null) ret; |
3 | long endTime = sysNow()+toMS(seconds); |
4 | do { |
5 | f.run(); |
6 | } while (sysNow() < endTime); |
7 | } |
Began life as a copy of #1032046
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032220 |
Snippet name: | repeatForNSeconds_atLeastOnce |
Eternal ID of this version: | #1032220/1 |
Text MD5: | 92309b182a5f891b191c02e41f52d9d5 |
Transpilation MD5: | 0603253bb87d95b4640bd8dba9aead21 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-08-20 11:55:22 |
Source code size: | 219 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 145 / 196 |
Referenced in: | [show references] |