Time

gopher.Time
See theTime companion object
abstract class Time[F[_]](gopherAPI: Gopher[F])

Time API, simular to one in golang standard library.

Attributes

See also

gopherApi#time

Companion
object
Source
Time.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class JSTime[F]

Members list

Type members

Classlikes

class Ticker(duration: FiniteDuration)

ticker which hold channel with expirable tick messages and iterface to stop one.

ticker which hold channel with expirable tick messages and iterface to stop one.

Attributes

Source
Time.scala
Supertypes
class Object
trait Matchable
class Any

Types

type after = FiniteDuration

type for using in select paterns.

type for using in select paterns.

Attributes

See also

[gopher.Select]

Source
Time.scala

Value members

Abstract methods

def schedule(fun: () => Unit, delay: FiniteDuration): Scheduled

Low level interface for scheduler

Low level interface for scheduler

Attributes

Source
Time.scala

Concrete methods

def after(duration: FiniteDuration): ReadChannel[F, FiniteDuration]

return channel, then after duration ellapses, send signal to this channel.

return channel, then after duration ellapses, send signal to this channel.

Attributes

Source
Time.scala
def asleep(duration: FiniteDuration): F[FiniteDuration]

return future which will be filled after time will ellapse.

return future which will be filled after time will ellapse.

Attributes

Source
Time.scala
def newTicker(duration: FiniteDuration): Ticker

create ticker with given duration between ticks.

create ticker with given duration between ticks.

Attributes

See also

[gopher.Time.Ticker]

Source
Time.scala
def now(): FiniteDuration

Attributes

Source
Time.scala
transparent inline def sleep(duration: FiniteDuration)(using CpsMonadContext[F]): FiniteDuration

synonim for await(asleep(duration)). Should be used inside async block.

synonim for await(asleep(duration)). Should be used inside async block.

Attributes

Source
Time.scala
def tick(duration: FiniteDuration): ReadChannel[F, FiniteDuration]

create ticker. When somebody read this ticker, than one receive duration messages. When nobody reading - messages are expired.

create ticker. When somebody read this ticker, than one receive duration messages. When nobody reading - messages are expired.

Attributes

Source
Time.scala