Clock

zio.Clock
See theClock companion trait
object Clock extends Serializable

Attributes

Companion
trait
Source
Clock.scala
Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Self type
Clock.type

Members list

Type members

Classlikes

final case class ClockJava(clock: Clock) extends Clock

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

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

Attributes

Source
Clock.scala
Supertypes
trait Product
trait Equals
trait Clock
trait Serializable
class Object
trait Matchable
class Any
Show all
object ClockLive extends Clock

Attributes

Source
Clock.scala
Supertypes
trait Clock
trait Serializable
class Object
trait Matchable
class Any
Self type
ClockLive.type

Value members

Concrete methods

def currentDateTime(implicit trace: Trace): UIO[OffsetDateTime]

Get the current time, represented in the current timezone.

Get the current time, represented in the current timezone.

Attributes

Source
Clock.scala
def currentTime(unit: => TimeUnit)(implicit trace: Trace): UIO[Long]

Returns the current time, relative to the Unix epoch.

Returns the current time, relative to the Unix epoch.

Attributes

Source
Clock.scala
def currentTime(unit: => ChronoUnit)(implicit trace: Trace, d: DummyImplicit): UIO[Long]

Attributes

Source
Clock.scala
def instant(implicit trace: Trace): UIO[Instant]

Attributes

Source
Clock.scala
def javaClock(implicit trace: Trace): UIO[Clock]

Constructs a java.time.Clock backed by the Clock service.

Constructs a java.time.Clock backed by the Clock service.

Attributes

Source
Clock.scala
def localDateTime(implicit trace: Trace): UIO[LocalDateTime]

Attributes

Source
Clock.scala
def nanoTime(implicit trace: Trace): UIO[Long]

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

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

Attributes

Source
Clock.scala
def scheduler(implicit trace: Trace): UIO[Scheduler]

Returns the scheduler used for scheduling effects.

Returns the scheduler used for scheduling effects.

Attributes

Source
Clock.scala
def sleep(duration: => Duration)(implicit trace: Trace): UIO[Unit]

Sleeps for the specified duration. This is always asynchronous.

Sleeps for the specified duration. This is always asynchronous.

Attributes

Source
Clock.scala

Inherited methods

final protected def toChronoUnit(unit: TimeUnit): ChronoUnit

Attributes

Inherited from:
ClockSyntaxPlatformSpecific (hidden)
Source
ClockSyntaxPlatformSpecific.scala

Implicits

Implicits

implicit val tag: Tag[Clock]

Attributes

Source
Clock.scala