module Athena::Clock::Interface

Overview

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

Direct including types

Defined in:

interface.cr

Instance Method Summary

Instance Method Detail

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

Returns a new clock instance set to the provided location.


[View source]
abstract def now : Time #

Returns the current time as determined by the clock.


[View source]
abstract def sleep(span : Time::Span) : Nil #

Sleeps for the provided span of time.


[View source]
abstract def sleep(seconds : Number) : Nil #

Sleeps for the provided amount of seconds.


[View source]