package octez-libs

  1. Overview
  2. Docs
A package that contains multiple base libraries used by the Octez suite

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.1.tar.gz
sha256=aa2f5bc99cc4ca2217c52a1af2a2cdfd3b383208cb859ca2e79ca0903396ca1d
sha512=d68bb3eb615e3dcccc845fddfc9901c95b3c6dc8e105e39522ce97637b1308a7fa7aa1d271351d5933febd7476b2819e1694f31198f1f0919681f1f9cc97cb3a

doc/octez-libs.base/Tezos_base/Time/index.html

Module Tezos_base.TimeSource

Time management

This module supports two distinct notions of time. The first notion of time is the time as handled by the protocol. This is the time that appears in the header of blocks, the time that baking slots are specified on, etc. It only has second-level precision.

The second notion of time is the time as handled by the system. This is the time as returned by the processor clock, the time that network timeouts are specified on, etc. In has sub-second precision.

The distinction between the two notions of time is important for multiple reasons:

  • Protocol time and system time may evolve independently. E.g., if a protocol update changes the notion of time.
  • Protocol time and system time have different levels of precision.
  • Protocol time and system time have different end-of-times. Respectively that's int64 end-of-time (some time in the year 292277026596) and RFC3339 end-of-time (end of the year 9999).

Note that while Protocol time has the int64 range, many of its functions do not work outside of the RFC3339 range, namely:

  • all xx_notation_xx functions (will be renamed and moved to an RFC submodule later)
  • rfc_encoding
  • pp_hum
Sourcemodule Protocol : sig ... end
Sourcemodule System : sig ... end
OCaml

Innovation. Community. Security.