def clock

bendvy-ecs-core@0.1.0.3 · world.bend:60

import bendvy-ecs-core@0.1.0.3/world.bend as World
import Base
import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick
import bendvy-ecs-core@0.1.0.3/clock_state.bend as Clock

60# Return administrative time without advancing it. Full epoch is required by readers.
61def clock(~S:Data,~C:Type,~R:Type,~E:Data,world:World<S,C,R,E>) -> World<S,C,R,E> & Tick.Tick:
62  match world:
63    case World{namespace,allocator,store,resource,events,pending,registrations,nextSystemId,+clock,lifecycle}:(World{namespace,allocator,store,resource,events,pending,registrations,nextSystemId,clock,lifecycle},Clock.now(clock))

Uses (5)

Used by (3)