More flip-flop tweaks

This commit is contained in:
Tony Garnock-Jones 2017-09-15 21:46:39 +01:00
parent e124983e05
commit 96331e0cfd
1 changed files with 4 additions and 2 deletions

View File

@ -20,9 +20,11 @@
(active-state))))
(inactive-state))
(spawn (on (asserted (active)) (send! (stdout-message "Flip-flop is active")))
(on (retracted (active)) (send! (stdout-message "Flip-flop is inactive")))
(spawn #:name 'monitor-flip-flop
(on (asserted (active)) (send! (stdout-message "Flip-flop is active")))
(on (retracted (active)) (send! (stdout-message "Flip-flop is inactive"))))
(spawn #:name 'periodic-toggle
(field [next-toggle-time (current-inexact-milliseconds)])
(on (asserted (later-than (next-toggle-time)))
(send! (toggle))