object TestClock extends Serializable
- Alphabetic
- By Inheritance
- TestClock
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
Data(nanoTime: Long, currentTimeMillis: Long, sleeps: List[(Duration, Promise[Nothing, Unit])], timeZone: ZoneId) extends Product with Serializable
The state of the
TestClock. - case class FiberData(nanoTime: Long) extends Product with Serializable
- trait Service[R] extends clock.Clock.Service[R] with scheduler.Scheduler.Service[R]
- 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
- sealed trait WarningData extends AnyRef
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
-
val
DefaultData: Data
The default initial state of the
TestClockwith the clock time set to0and no effects scheduled to run. -
def
adjust(duration: Duration): ZIO[TestClock, Nothing, Unit]
Accesses a
TestClockinstance in the environment and increments the time by the specified duration, running any actions scheduled for on or before the new time. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
fiberTime: ZIO[TestClock, Nothing, Duration]
Accesses a
TestClockinstance in the environment and returns the current fiber time for this fiber. -
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
make(data: Data, live: Option[Live.Service[Clock with Console]] = None): UManaged[TestClock]
Constructs a new
TestClockwith the specified initial state.Constructs a new
TestClockwith the specified initial state. This can be useful for providing the required environment to an effect that requires aClock, such as with ZIO!.provide. -
def
makeTest(data: Data, live: Option[Live.Service[Clock with Console]] = None): UManaged[Test]
Constructs a new
Testobject that implements theTestClockinterface.Constructs a new
Testobject that implements theTestClockinterface. This can be useful for mixing in with implementations of other interfaces. -
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
setDateTime(dateTime: OffsetDateTime): ZIO[TestClock, Nothing, Unit]
Accesses a
TestClockinstance in the environment and sets the clock time to the specifiedOffsetDateTime, running any actions scheduled for on or before the new time. -
def
setTime(duration: Duration): ZIO[TestClock, Nothing, Unit]
Accesses a
TestClockinstance in the environment and sets the clock time to the specified time in terms of duration since the epoch, running any actions scheduled for on or before the new time. -
def
setTimeZone(zone: ZoneId): ZIO[TestClock, Nothing, Unit]
Accesses a
TestClockinstance in the environment, setting the time zone to the specified time zone.Accesses a
TestClockinstance in the environment, setting the time zone to the specified time zone. The clock time in terms of nanoseconds since the epoch will not be altered and no scheduled actions will be run as a result of this effect. -
val
sleeps: ZIO[TestClock, Nothing, List[Duration]]
Accesses a
TestClockinstance in the environment and returns a list of times that effects are scheduled to run. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
timeZone: ZIO[TestClock, Nothing, ZoneId]
Accesses a
TestClockinstance in the environemtn and returns the current time zone. -
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- object FiberData extends Serializable
- object WarningData