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