示例#1
0
 /**
  * Create a Promise which, after a delay, will be redeemed with the result of a given function.
  * The function will be called after the delay.
  *
  * @param function The function to call to fulfill the Promise.
  * @param delay The time to wait.
  * @param unit The units to use for the delay.
  * @param ec The ExecutionContext to run the Function0 in.
  */
 public static <A> Promise<A> delayed(
     Function0<A> function, long delay, TimeUnit unit, ExecutionContext ec) {
   return FPromiseHelper.delayed(function, delay, unit, ec);
 }
示例#2
0
 /**
  * Create a Promise which, after a delay, will be redeemed with the result of a given function.
  * The function will be called after the delay.
  *
  * <p>The function will be run in the default ExecutionContext.
  *
  * @param function The function to call to fulfill the Promise.
  * @param delay The time to wait.
  * @param unit The units to use for the delay.
  */
 public static <A> Promise<A> delayed(Function0<A> function, long delay, TimeUnit unit) {
   return FPromiseHelper.delayed(function, delay, unit, HttpExecution.defaultContext());
 }