:time app, measures time between poke and subsequent wakeup

This commit is contained in:
Dan Haffey 2016-07-24 18:02:52 -07:00
parent 4903cf6411
commit bacc213671

19
app/time.hoon Normal file
View File

@ -0,0 +1,19 @@
::
:::: /hoon/time/app
::
/? 310
|%
++ card {$wait wire @da}
--
|_ {bowl $~}
++ poke-noun
|= *
:_ +>.$ :_ ~
[ost %wait /(scot %da now) +(now)]
::
++ wake
|= {wir/wire $~}
?> ?=({@ $~} wir)
~& [%took `@dr`(sub now (slav %da i.wir))]
[~ +>.$]
--