import * as tsplus_module_1 from "@tsplus/stdlib/data/Duration";
import * as tsplus_module_2 from "@effect/core/io/Schedule/operations/elapsed";
import * as tsplus_module_3 from "@effect/core/io/Schedule/operations/whileOutput";
/**
 * A schedule that recurs during the given duration.
 *
 * @tsplus static ets/Schedule/Ops upTo
 */

export function recurUpTo(duration) {
  return tsplus_module_3.whileOutput_(tsplus_module_2.elapsed, _ => tsplus_module_1.lowerThen_(_, duration));
}
//# sourceMappingURL=recurUpTo.mjs.map