Advertisement
FALSkills

Untitled

Oct 18th, 2020
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. [2020-10-18 10:09:59] Waiting until we have count: 1000 or higher of filtered item.
  2. [2020-10-18 10:10:00] Condition before starting to wait: false, duration to wait: 6000
  3. [2020-10-18 10:10:00] Condition after wait: false, duration of wait: 291
  4.  
  5. example code (method would just return the output call)
  6.  
  7. public static boolean waitCondition(BooleanSupplier condition, long ms){
  8. long curr = ContextResolver.resolve().time().current();
  9. ContextResolver.resolve().logger().log("Condition before starting to wait: " + condition.getAsBoolean() + ", duration to wait: " + ms);
  10. boolean output = ContextResolver.resolve().sleep().as(condition, ms);
  11. ContextResolver.resolve().logger().log("Condition after wait: " + condition.getAsBoolean() + ", duration of wait: " + ContextResolver.resolve().time().from(curr));
  12. return output;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement