ames: init cork timer on larval +take
::
?: &(?=(^ cached-state) ?=(~ queued-events))
=^ moves adult-gate (call:adult-core duct dud task)
- =? moves ?=(%7 +<.cached-state)
+ %- molt
~> %slog.0^leaf/"ames: init daily recork timer"
:_(moves [duct %pass /recork %b %wait `@da`(add now ~d1)])
- (molt moves)
:: %born: set .unix-duct and start draining .queued-events
::
?: ?=(%born -.task)
:: .queued-events has been cleared; metamorphose
::
?~ queued-events
- ?: ?=(^ cached-state) (molt moves)
+ ?. ?=(^ cached-state)
~> %slog.0^leaf/"ames: metamorphosis"
[moves adult-gate]
+ %- molt
+ ~> %slog.0^leaf/"ames: init daily recork timer"
+ :_(moves [duct %pass /recork %b %wait `@da`(add now ~d1)])
:: set timer to drain next event
::
=. moves :_(moves [duct %pass /larva %b %wait now])
