const fileName_1 = "(@effect/core) _src/io/Schedule/operations/duration.ts";
import * as tsplus_module_1 from "@effect/core/io/Schedule/Interval";
import * as tsplus_module_2 from "@effect/core/io/Schedule/Decision";
import * as tsplus_module_3 from "@tsplus/stdlib/data/Tuple/make";
import * as tsplus_module_4 from "@tsplus/stdlib/data/Duration";
import * as tsplus_module_5 from "@effect/core/io/Effect/operations/succeed";
import { makeWithState } from "@effect/core/io/Schedule/operations/_internal/makeWithState";
/**
 * A schedule that can recur one time, the specified amount of time into the
 * future.
 *
 * @tsplus static ets/Schedule/Ops duration
 */

export function duration(duration) {
  return makeWithState(true, (now, _, state) => tsplus_module_5.succeed(() => state ? tsplus_module_3.make(false, duration, tsplus_module_2._continue(tsplus_module_1.after(now + duration.millis))) : tsplus_module_3.make(false, tsplus_module_4.millis(0), tsplus_module_2.done), fileName_1 + ":15:19"));
}
//# sourceMappingURL=duration.mjs.map