Time

abstract
class Time[F[_]](gopherAPI: Gopher[F])

Time API, simular to one in golang standard library.

See also

gopherApi#time

Companion
object
Source
Time.scala
class Object
trait Matchable
class Any
class JVMTime[F]

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.

Source
Time.scala

Types

type after = FiniteDuration

type for using in select paterns.

type for using in select paterns.

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

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.

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.

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

create ticker with given duration between ticks.

create ticker with given duration between ticks.

See also

[gopher.Time.Ticker]

Source
Time.scala
def now(): FiniteDuration
transparent inline
def sleep(duration: FiniteDuration): FiniteDuration

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

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

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.

Source
Time.scala