OxL Reference

fn now

Hybrid logical clock stamp of a new event (§12.6, §17.3).

Example:

oxl✓ checked in CI
use std.cluster

fn main() io {
  let a = cluster.now()
  let b = cluster.now()
  print(a < b)
}
Output
true
pub(api) fn now() -> Hlc

Thread safety. safe to call from any task; stamps taken on one node are strictly increasing.

Since. 1.0.0-beta

Returns

Hlc

Effects

none declared (pure unless the body says otherwise)

Defined in: std/cluster/cluster.oxl:143

See also