Rheo.Clock.System (rheo v1.0.0)

Copy Markdown View Source

Wall-clock implementation of Rheo.Clock.

Uses DateTime.utc_now/0 truncated to milliseconds. This is the default clock in non-test environments.

Summary

Functions

Returns the current UTC wall-clock time.

Functions

utc_now()

@spec utc_now() :: DateTime.t()

Returns the current UTC wall-clock time.

Examples

iex> match?(%DateTime{time_zone: "Etc/UTC"}, Rheo.Clock.System.utc_now())
true

Returns

A DateTime.t() truncated to milliseconds.