egg timer done

This commit is contained in:
Thorn Avery 2019-10-16 11:04:52 +13:00
parent aac01b3ce3
commit 40795a9d30

18
201/week4/egg.hoon Normal file
View File

@ -0,0 +1,18 @@
|%
+$ effect (pair bone syscall)
+$ syscall [%wait path @da]
--
|_ [bowl:gall ~]
++ poke-noun
|= t=@da
?: (lth t now)
!!
^+ [*(list effect) +>.$]
:_ +>.$ :_ ~
[ost %wait /egg-timer t]
++ wake
|= [=wire error=(unit tang)]
^+ [*(list effect) +>.$]
~& "Timer went off!"
[~ +>.$]
--