Clock

kyo.Clock
See theClock companion object
abstract class Clock

A clock that provides time-related operations.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def now(using Frame): Instant < IO

Gets the current time as an Instant.

Gets the current time as an Instant.

Attributes

Returns

The current time

def unsafe: Unsafe

Concrete methods

def deadline(duration: Duration)(using Frame): Deadline < IO

Creates a new deadline with the specified duration.

Creates a new deadline with the specified duration.

Value parameters

duration

The duration for the deadline

Attributes

Returns

A new Deadline instance

def stopwatch(using Frame): Stopwatch < IO

Creates a new stopwatch.

Creates a new stopwatch.

Attributes

Returns

A new Stopwatch instance