Updated style of timer

This commit is contained in:
Logan Allen 2019-06-27 14:25:23 -07:00
parent 08e9891f31
commit 88eb5cc7ed

View File

@ -44,10 +44,12 @@
++ prep ++ prep
|= old=(unit tim=@da) |= old=(unit tim=@da)
^- (quip move _this) ^- (quip move _this)
=/ lismov/(list move) %+ weld =/ launchnoun [%noun [%timer /tile '/~timer/js/tile.js']]
`(list move)`[ost.bol %connect / [~ /'~timer'] %timer]~ :-
`(list move)`[ost.bol %poke /timer [our.bol %launch] [%noun [%timer /tile '/~timer/js/tile.js']]]~ :~
:- lismov [ost.bol %connect / [~ /'~timer'] %timer]
[ost.bol %poke /timer [our.bol %launch] launchnoun]
==
?~ old ?~ old
this this
%= this %= this
@ -76,25 +78,21 @@
=/ str/@t +.jon =/ str/@t +.jon
?: =(str 'start') ?: =(str 'start')
=/ data/@da (add now.bol ~s10) =/ data/@da (add now.bol ~s10)
:- %+ weld :_ this(tim data)
`(list move)`(send-tile-diff [%s (scot %da data)]) [[ost.bol %wait /timer data] (send-tile-diff [%s (scot %da data)])]
`(list move)`[ost.bol %wait /timer data]~
this(tim data)
?: =(str 'stop') ?: =(str 'stop')
:- %+ weld :_ this(tim *@da)
`(list move)`(send-tile-diff [%s '']) [[ost.bol %rest /timer tim] (send-tile-diff [%s ''])]
`(list move)`[ost.bol %rest /timer tim]~
this(tim *@da)
[~ this] [~ this]
:: ::
++ poke-handle-http-request ++ poke-handle-http-request
%- (require-authorization:app ost.bol move this) %- (require-authorization:app ost.bol move this)
|= =inbound-request:http-server |= =inbound-request:http-server
^- (quip move _this) ^- (quip move _this)
=+ request-line=(parse-request-line url.request.inbound-request) =/ request-line (parse-request-line url.request.inbound-request)
=+ back-path=(flop site.request-line) =/ back-path (flop site.request-line)
=/ name=@t =/ name=@t
=+ back-path=(flop site.request-line) =/ back-path (flop site.request-line)
?~ back-path ?~ back-path
'' ''
i.back-path i.back-path