Clock
Constructors
Signature
declare const clockWith: <A, E, R>(f: (clock: Clock) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>currentTimeMillis
Added in v2.0.0
Source
Signature
declare const currentTimeMillis: Effect.Effect<number>currentTimeNanos
Added in 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
Added in 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
Added in v2.0.0
Source
Signature
interface ClockScheduler { unsafeSchedule(task: Task, duration: Duration): CancelToken;}Signature
type Task = () => voidSymbols
ClockTypeId
Added in v2.0.0
Source
Signature
declare const ClockTypeId: unique symbolClockTypeId type
Added in v2.0.0
Source
Signature
type ClockTypeId = typeof ClockTypeId