Clock
Constructors
Signature
declare const clockWith: <A, E, R>(f: (clock: Clock) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, R> Since v2.0.0 Source
Signature
declare const currentTimeMillis: Effect.Effect<number> Since v2.0.0 Source
Signature
declare const currentTimeNanos: Effect.Effect<bigint>Signature
declare const make: (_: void) => ClockSignature
declare const sleep: (duration: Duration.DurationInput) => Effect.Effect<void>Context
Models
CancelToken
type Since v2.0.0 Source
Signature
type CancelToken = () => booleanRepresents a time-based clock which provides functionality related to time and scheduling.
Signature
interface Clock { readonly [ClockTypeId]: typeof ClockTypeId; readonly currentTimeMillis: Effect<number>; readonly currentTimeNanos: Effect<bigint>; sleep(duration: Duration): Effect<void>; unsafeCurrentTimeMillis(): number; unsafeCurrentTimeNanos(): bigint;}ClockScheduler
interface Since v2.0.0 Source
Signature
interface ClockScheduler { unsafeSchedule(task: Task, duration: Duration): CancelToken;}Signature
type Task = () => voidSymbols
Since v2.0.0 Source
Signature
declare const ClockTypeId: unique symbolClockTypeId
type Since v2.0.0 Source
Signature
type ClockTypeId = typeof ClockTypeId