Packages

object Clock extends ClockPlatformSpecific with Serializable

Linear Supertypes
Serializable, Serializable, ClockPlatformSpecific, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Clock
  2. Serializable
  3. Serializable
  4. ClockPlatformSpecific
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class ClockJava(clock: java.time.Clock) extends Clock with Product with Serializable

    An implementation of the Clock service backed by a java.time.Clock.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val any: ZLayer[Clock, Nothing, Clock]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def currentDateTime(implicit trace: ZTraceElement): URIO[Clock, OffsetDateTime]

    Get the current time, represented in the current timezone.

  8. def currentTime(unit: ⇒ TimeUnit)(implicit trace: ZTraceElement): URIO[Clock, Long]

    Returns the current time, relative to the Unix epoch.

  9. def driver[Env, In, Out](schedule: Schedule[Env, In, Out])(implicit trace: ZTraceElement): URIO[Clock, Driver[State, Env, In, Out]]
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def instant(implicit trace: ZTraceElement): ZIO[Clock, Nothing, Instant]
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. val javaClock: ZLayer[java.time.Clock, Nothing, Clock]

    Constructs a Clock service from a java.time.Clock.

  18. val live: Layer[Nothing, Clock]
  19. def localDateTime(implicit trace: ZTraceElement): ZIO[Clock, Nothing, LocalDateTime]
  20. def nanoTime(implicit trace: ZTraceElement): URIO[Clock, Long]

    Returns the system nano time, which is not relative to any date.

  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. def repeat[R, R1 <: R, E, A, B](zio: ⇒ ZIO[R, E, A])(schedule: ⇒ Schedule[R1, A, B])(implicit trace: ZTraceElement): ZIO[R1 with Clock, E, B]

    Returns a new effect that repeats this effect according to the specified schedule or until the first failure.

    Returns a new effect that repeats this effect according to the specified schedule or until the first failure. Scheduled recurrences are in addition to the first execution, so that io.repeat(Schedule.once) yields an effect that executes io, and then if that succeeds, executes io an additional time.

  25. final def repeatOrElse[R, R1 <: R, E, E2, A, B](zio: ⇒ ZIO[R, E, A])(schedule: ⇒ Schedule[R1, A, B], orElse: (E, Option[B]) ⇒ ZIO[R1, E2, B])(implicit trace: ZTraceElement): ZIO[R1 with Clock, E2, B]

    Returns a new effect that repeats this effect according to the specified schedule or until the first failure, at which point, the failure value and schedule output are passed to the specified handler.

    Returns a new effect that repeats this effect according to the specified schedule or until the first failure, at which point, the failure value and schedule output are passed to the specified handler.

    Scheduled recurrences are in addition to the first execution, so that io.repeat(Schedule.once) yields an effect that executes io, and then if that succeeds, executes io an additional time.

  26. final def repeatOrElseEither[R, R1 <: R, E, E2, A, B, C](zio: ⇒ ZIO[R, E, A])(schedule: ⇒ Schedule[R1, A, B], orElse: (E, Option[B]) ⇒ ZIO[R1, E2, C])(implicit trace: ZTraceElement): ZIO[R1 with Clock, E2, Either[C, B]]

    Returns a new effect that repeats this effect according to the specified schedule or until the first failure, at which point, the failure value and schedule output are passed to the specified handler.

    Returns a new effect that repeats this effect according to the specified schedule or until the first failure, at which point, the failure value and schedule output are passed to the specified handler.

    Scheduled recurrences are in addition to the first execution, so that io.repeat(Schedule.once) yields an effect that executes io, and then if that succeeds, executes io an additional time.

  27. final def retry[R, R1 <: R, E, A, S](zio: ⇒ ZIO[R, E, A])(policy: ⇒ Schedule[R1, E, S])(implicit ev: CanFail[E], trace: ZTraceElement): ZIO[R1 with Clock, E, A]

    Retries with the specified retry policy.

    Retries with the specified retry policy. Retries are done following the failure of the original io (up to a fixed maximum with once or recurs for example), so that that io.retry(Schedule.once) means "execute io and in case of failure, try again once".

  28. final def retryOrElse[R, R1 <: R, E, E1, A, A1 >: A, S](zio: ⇒ ZIO[R, E, A])(policy: ⇒ Schedule[R1, E, S], orElse: (E, S) ⇒ ZIO[R1, E1, A1])(implicit ev: CanFail[E], trace: ZTraceElement): ZIO[R1 with Clock, E1, A1]

    Retries with the specified schedule, until it fails, and then both the value produced by the schedule together with the last error are passed to the recovery function.

  29. final def retryOrElseEither[R, R1 <: R, E, E1, A, B, Out](zio: ⇒ ZIO[R, E, A])(schedule: ⇒ Schedule[R1, E, Out], orElse: (E, Out) ⇒ ZIO[R1, E1, B])(implicit ev: CanFail[E], trace: ZTraceElement): ZIO[R1 with Clock, E1, Either[B, A]]

    Returns an effect that retries this effect with the specified schedule when it fails, until the schedule is done, then both the value produced by the schedule together with the last error are passed to the specified recovery function.

  30. final def schedule[R, R1 <: R, E, A, B](zio: ⇒ ZIO[R, E, A])(schedule: ⇒ Schedule[R1, Any, B])(implicit trace: ZTraceElement): ZIO[R1 with Clock, E, B]

    Runs this effect according to the specified schedule.

    Runs this effect according to the specified schedule.

    See scheduleFrom for a variant that allows the schedule's decision to depend on the result of this effect.

  31. final def scheduleFrom[R, R1 <: R, E, A, A1 >: A, B](zio: ⇒ ZIO[R, E, A])(a: ⇒ A1)(schedule: ⇒ Schedule[R1, A1, B])(implicit trace: ZTraceElement): ZIO[R1 with Clock, E, B]

    Runs this effect according to the specified schedule starting from the specified input value.

  32. def scheduler(implicit trace: ZTraceElement): URIO[Clock, Scheduler]

    Returns the scheduler used for scheduling effects.

  33. def sleep(duration: ⇒ zio.Duration)(implicit trace: ZTraceElement): URIO[Clock, Unit]

    Sleeps for the specified duration.

    Sleeps for the specified duration. This is always asynchronous.

  34. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  39. object ClockLive extends Clock

Inherited from Serializable

Inherited from Serializable

Inherited from ClockPlatformSpecific

Inherited from AnyRef

Inherited from Any

Ungrouped