 
 : next-alarm ( alarms -- timestamp/f )
     dup heap-empty?
-    [ drop f ] [ heap-peek drop time>> ] if ;
+    [ drop f ] [ heap-peek drop alarm-time ] if ;
 
 : alarm-thread-loop ( -- )
     alarms get-global


: cancel-alarms ( alarms -- )
    [
        heap-pop-all [ nip entry>> box> drop ] assoc-each
    ] when* ;

: init-alarms ( -- )

    [ hence ] keep add-alarm ;

: cancel-alarm ( alarm -- )
    alarm-entry [ alarms get-global heap-delete ] if-box? ;
