svoid withMinTime(long minTime, Runnable r) { long destTime = sysNow()+minTime; try { callF(r); } finally { sleepUntilSysTime(destTime); } }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1016550 |
| Snippet name: | withMinTime - sleep if code executed shorter than x milliseconds (sleeps also in case of exception) |
| Eternal ID of this version: | #1016550/6 |
| Text MD5: | cc54be3d427e3d47bd5d76a8d6470a40 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-06-23 14:53:09 |
| Source code size: | 163 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 616 / 640 |
| Version history: | 5 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |