Skip to content

module Athena::Clock::Interface #

Represents a clock that returns a Time instance, possibly in a specific location.

Direct including types

Athena::Clock Athena::Clock::Monotonic Athena::Clock::Native Athena::Clock::Spec::MockClock

Methods#

abstract #in_location(location : Time::Location) : self#

Returns a new clock instance set to the provided location.

View source

abstract #now : Time#

Returns the current time as determined by the clock.

View source

abstract #sleep(span : Time::Span) : Nil#

Sleeps for the provided span of time.

View source

abstract #sleep(seconds : Number) : Nil#

Sleeps for the provided amount of seconds.

View source