Packages

  • package root
    Definition Classes
    root
  • package zio
    Definition Classes
    root
  • package blocking
    Definition Classes
    zio
  • package clock
    Definition Classes
    zio
  • Clock
  • package console
    Definition Classes
    zio
  • package duration
    Definition Classes
    zio
  • package internal
    Definition Classes
    zio
  • package random
    Definition Classes
    zio
  • package stm
    Definition Classes
    zio
  • package stream
    Definition Classes
    zio
  • package system
    Definition Classes
    zio
  • package test

    _ZIO Test_ is a featherweight testing library for effectful programs.

    _ZIO Test_ is a featherweight testing library for effectful programs.

    The library imagines every spec as an ordinary immutable value, providing tremendous potential for composition. Thanks to tight integration with ZIO, specs can use resources (including those requiring disposal), have well- defined linear and parallel semantics, and can benefit from a host of ZIO combinators.

    import zio.test._
    import zio.test.environment.Live
    import zio.clock.nanoTime
    import Assertion.isGreaterThan
    
    object MyTest extends DefaultRunnableSpec {
      def spec = suite("clock")(
        testM("time is non-zero") {
          assertM(Live.live(nanoTime))(isGreaterThan(0))
        }
      )
    }
    Definition Classes
    zio
p

zio

clock

package clock

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. clock
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type Clock = Has[Service]

Value Members

  1. val currentDateTime: ZIO[Clock, DateTimeException, OffsetDateTime]

    Get the current time, represented in the current timezone.

  2. def currentTime(unit: => TimeUnit): URIO[Clock, Long]

    Returns the current time, relative to the Unix epoch.

  3. val instant: ZIO[Clock, Nothing, Instant]
  4. val nanoTime: URIO[Clock, Long]

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

  5. def sleep(duration: => Duration): URIO[Clock, Unit]

    Sleeps for the specified duration.

    Sleeps for the specified duration. This is always asynchronous.

  6. object Clock extends PlatformSpecific with Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped