Bloccs.Effects.Time behaviour (bloccs v0.2.0)

Copy Markdown View Source

Time effect facade + backend behaviour. Nodes call Bloccs.Effects.Time.now/1 against ctx.effects.time. Default backend is the real wall clock (Time.System); tests can bind a frozen-clock backend.

Summary

Functions

Current time through the bound clock backend.

Types

cap()

@type cap() :: struct()

Callbacks

new(term)

@callback new(term()) :: cap()

now(cap)

@callback now(cap()) :: DateTime.t()

Functions

now(cap)

@spec now(cap()) :: DateTime.t()

Current time through the bound clock backend.