     over interval-nanos>> *
     over start-nanos>> +
     over delay-nanos>> [ + ] when*
-    >>iteration-start-nanos ; inline
+    >>iteration-start-nanos ;
+
+: stop-alarm? ( alarm -- ? )
+    thread>> self eq? not ;
 
 DEFER: call-alarm-loop
 

        swap >>quot ; inline

: start-alarm ( alarm -- )
    f >>stop?
    nano-count >>start-nanos
    call-alarm ;

: stop-alarm ( alarm -- )
    t >>stop?
    f >>start-nanos
    drop ;

<PRIVATE


    delay-nanos
    interval-nanos
    iteration-start-nanos
    quotation-running?
    thread ;

<PRIVATE
