final case class Test(clockState: Ref[Data], fiberState: FiberRef[FiberData], live: Live.Service, warningState: RefM[WarningData]) extends clock.Clock.Service with Service with Product with Serializable
- Alphabetic
- By Inheritance
- Test
- Product
- Equals
- Service
- Restorable
- Service
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Test(clockState: Ref[Data], fiberState: FiberRef[FiberData], live: Live.Service, 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
- def adjust(duration: Duration): UIO[Unit]
Increments the wall 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()
- def currentDateTime: UIO[OffsetDateTime]
Returns the current fiber time as an
OffsetDateTime.Returns the current fiber time as an
OffsetDateTime.- Definition Classes
- Test → Service
- def currentTime(unit: TimeUnit): UIO[Long]
Returns the current fiber time in the specified time unit.
Returns the current fiber time in the specified time unit.
- Definition Classes
- Test → Service
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val fiberState: FiberRef[FiberData]
- 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
- val nanoTime: UIO[Long]
Returns the current fiber time in nanoseconds.
Returns the current fiber 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
- def runAll: UIO[Unit]
Runs all scheduled effects.
- val save: UIO[UIO[Unit]]
Saves the
TestClock's current state in an effect which, when run, will restore theTestClockstate to the saved stateSaves the
TestClock's current state in an effect which, when run, will restore theTestClockstate to the saved state- Definition Classes
- Test → Restorable
- def setDateTime(dateTime: OffsetDateTime): UIO[Unit]
Sets the wall clock time to the specified
OffsetDateTime. - def setTime(duration: Duration): UIO[Unit]
Sets the wall clock time to the specified time in terms of duration since the epoch.
- def setTimeZone(zone: ZoneId): UIO[Unit]
Sets the time zone to the specified time zone.
- def sleep(duration: Duration): UIO[Unit]
Semantically blocks the current fiber until the wall clock time is equal to or greater than the specified duration.
Semantically blocks the current fiber until the wall clock time is equal to or greater than the specified duration. Once the wall clock time is adjusted to on or after the duration, the fiber will automatically be resumed.
- Definition Classes
- Test → Service
- lazy val sleeps: UIO[List[Duration]]
Returns a list of the wall clock times at which all queued effects are scheduled to resume.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- lazy 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]