mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-16 10:49:26 +03:00
Merge pull request #939 from urbit/behn-fix
Fix Behn bug that broke Clay
This commit is contained in:
commit
de9349b47b
@ -86,8 +86,9 @@
|
|||||||
:~ timers+[%& timers]
|
:~ timers+[%& timers]
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
|
:: reverse moves, since they were constructed backward, and return
|
||||||
::
|
::
|
||||||
[moves ..^^$]
|
[(flop moves) ..^^$]
|
||||||
:: +set-timer: set a timer, maintaining the sort order of the :timers list
|
:: +set-timer: set a timer, maintaining the sort order of the :timers list
|
||||||
::
|
::
|
||||||
++ set-timer
|
++ set-timer
|
||||||
@ -96,9 +97,9 @@
|
|||||||
::
|
::
|
||||||
?~ timers
|
?~ timers
|
||||||
~[t]
|
~[t]
|
||||||
:: timers at the same date form a lifo queue; for fifo, change +lte to +lth
|
:: timers at the same date form a fifo queue
|
||||||
::
|
::
|
||||||
?: (lte date.t date.i.timers)
|
?: (lth date.t date.i.timers)
|
||||||
[t timers]
|
[t timers]
|
||||||
::
|
::
|
||||||
[i.timers $(timers t.timers)]
|
[i.timers $(timers t.timers)]
|
||||||
@ -140,14 +141,14 @@
|
|||||||
::
|
::
|
||||||
?~ timers
|
?~ timers
|
||||||
?~ next-wake
|
?~ next-wake
|
||||||
[~ state]
|
[moves state]
|
||||||
:_ state(next-wake ~)
|
:_ state(next-wake ~)
|
||||||
[[unix-duct %give %doze ~] moves]
|
[[unix-duct %give %doze ~] moves]
|
||||||
:: if :next-wake is in the past or not soon enough, reset it
|
:: if :next-wake is in the past or not soon enough, reset it
|
||||||
::
|
::
|
||||||
?^ next-wake
|
?^ next-wake
|
||||||
?: &((gte date.i.timers u.next-wake) (lte now u.next-wake))
|
?: &((gte date.i.timers u.next-wake) (lte now u.next-wake))
|
||||||
[~ state]
|
[moves state]
|
||||||
:_ state(next-wake `date.i.timers)
|
:_ state(next-wake `date.i.timers)
|
||||||
[[unix-duct %give %doze `date.i.timers] moves]
|
[[unix-duct %give %doze `date.i.timers] moves]
|
||||||
:: there was no unix wakeup timer; set one
|
:: there was no unix wakeup timer; set one
|
||||||
|
Loading…
Reference in New Issue
Block a user