Clock

cats.effect.kernel.Clock
See theClock companion object
trait Clock[F[_]] extends Serializable

A typeclass which encodes various notions of time. Analogous to some of the time functions exposed by java.lang.System.

Attributes

Companion:
object
Source:
Clock.scala
Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
trait GenTemporal[F, E]
trait Sync[F]
trait Async[F]

Members list

Concise view

Value members

Abstract methods

Attributes

Source:
Clock.scala

Monotonic time subject to the law that (monotonic, monotonic).mapN(_ <= _)

Monotonic time subject to the law that (monotonic, monotonic).mapN(_ <= _)

Analogous to java.lang.System.nanoTime.

Attributes

Source:
Clock.scala

A representation of the current system time

A representation of the current system time

Analogous to java.lang.System.currentTimeMillis.

Attributes

Source:
Clock.scala

Concrete methods

def timed[A](fa: F[A]): F[(FiniteDuration, A)]

Returns an effect that completes with the result of the source together with the duration that it took to complete.

Returns an effect that completes with the result of the source together with the duration that it took to complete.

Attributes

fa

The effect which we wish to time the execution of

Source:
Clock.scala

Inherited methods

def realTimeInstant: F[Instant]

Attributes

Inherited from:
ClockPlatform (hidden)
Source:
ClockPlatform.scala