case class Test(clockState: Ref[Data], fiberState: FiberRef[FiberData], live: Live.Service[Clock with Console], warningState: RefM[WarningData]) extends Service[Any] with Product with Serializable
- Alphabetic
- By Inheritance
- Test
- Product
- Equals
- Service
- Service
- Service
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Test(clockState: Ref[Data], fiberState: FiberRef[FiberData], live: Live.Service[Clock with Console], warningState: RefM[WarningData])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def adjust(duration: Duration): UIO[Unit]
Increments the current clock time by the specified duration.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val clockState: Ref[Data]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def currentDateTime: UIO[OffsetDateTime]
Returns the current clock time as an
OffsetDateTime.Returns the current clock time as an
OffsetDateTime.- Definition Classes
- Test → Service
- final def currentTime(unit: TimeUnit): UIO[Long]
Returns the current clock time in the specified time unit.
Returns the current clock time in the specified time unit.
- Definition Classes
- Test → Service
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val fiberState: FiberRef[FiberData]
- final val fiberTime: UIO[Duration]
Returns the current fiber time for this fiber.
Returns the current fiber time for this fiber. The fiber time is backed by a
FiberRefand is incremented for the duration each fiber is sleeping. When a fiber is joined the fiber time will be set to the maximum of the fiber time of the parent and child fibers. Thus, the fiber time reflects the duration of sleeping that has occurred for this fiber to reach its current state, properly reflecting forks and joins.for { _ <- TestClock.set(Duration.Infinity) _ <- ZIO.sleep(2.millis).zipPar(ZIO.sleep(1.millis)) result <- TestClock.fiberTime } yield result.toNanos == 2000000L
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val live: Live.Service[Clock with Console]
- final val nanoTime: UIO[Long]
Returns the current clock time in nanoseconds.
Returns the current clock time in nanoseconds.
- Definition Classes
- Test → Service
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val scheduler: ZIO[Any, Nothing, Scheduler]
Returns an effect that creates a new
Schedulerbacked by thisTestClock.Returns an effect that creates a new
Schedulerbacked by thisTestClock.- Definition Classes
- Test → Service
- final def setDateTime(dateTime: OffsetDateTime): UIO[Unit]
Sets the current clock time to the specified
OffsetDateTime. - final def setTime(duration: Duration): UIO[Unit]
Sets the current clock time to the specified time in terms of duration since the epoch.
- final def setTimeZone(zone: ZoneId): UIO[Unit]
Sets the time zone to the specified time zone.
- final def sleep(duration: Duration): UIO[Unit]
Semantically blocks the current fiber until the clock time is equal to or greater than the specified duration.
Semantically blocks the current fiber until the clock time is equal to or greater than the specified duration. Once the clock time is adjusted to on or after the duration, the fiber will automatically be resumed.
- Definition Classes
- Test → Service
- val sleeps: UIO[List[Duration]]
Returns a list of the times at which all queued effects are scheduled to resume.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val timeZone: UIO[ZoneId]
Returns the time zone.
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- val warningState: RefM[WarningData]