Idris2Doc : IotaTime.Clock

IotaTime.Clock

(source)

Definitions

interfaceClock : Type->Type
  A source of current instants. Application code can quantify over this
capability to replace the system clock in deterministic tests.

Parameters: clock
Methods:
getCurrentInstant : clock->IOInstant

Implementations:
ClockSystemClock
ClockFixedClock
getCurrentInstant : Clockclock=>clock->IOInstant
Totality: total
Visibility: public export
dataSystemClock : Type
  The host operating system's UTC clock.

Totality: total
Visibility: public export
Constructor: 
MkSystemClock : SystemClock

Hint: 
ClockSystemClock
systemClock : SystemClock
  The system clock value used by production applications.

Totality: total
Visibility: public export
dataFixedClock : Type
  A clock that always returns one instant.

Totality: total
Visibility: public export
Constructor: 
MkFixedClock : Instant->FixedClock

Hint: 
ClockFixedClock
fixedClock : Instant->FixedClock
  Construct a deterministic clock fixed at the supplied instant.

Totality: total
Visibility: public export
recordZonedClock : Type->Type->Type
  A clock paired with a time zone and calendar representation.

Totality: total
Visibility: export
Constructor: 
MkZonedClock : clock->TimeZone->ZonedClockcalendarclock

Projections:
.clockZone : ZonedClockcalendarclock->TimeZone
.underlyingClock : ZonedClockcalendarclock->clock
zonedClock : clock->TimeZone->ZonedClockcalendarclock
  Pair any clock with the zone used to display its current instant.

Totality: total
Visibility: public export
getCurrentZonedDateTime : {autocal : Calendarcalendar} ->HasCalendarBridge (CalendarDatecalendar) =>Clockclock=>ZonedClockcalendarclock->IO (EitherCalendarConversionError (ZonedDateTimecalendar))
  Read a clock and display its current instant in the configured zone.

Totality: total
Visibility: public export