timers: simplify stop-timer.

handle-patch-and-put
John Benediktsson 2018-08-23 20:37:20 -07:00
parent a27f560475
commit 4dcfefc0b9
1 changed files with 2 additions and 4 deletions

View File

@ -88,10 +88,8 @@ PRIVATE>
: stop-timer ( timer -- ) : stop-timer ( timer -- )
dup quotation-running?>> [ dup quotation-running?>> [
f >>thread drop dup thread>> [ interrupt ] when*
] [ ] unless f >>thread drop ;
[ [ interrupt ] when* f ] change-thread drop
] if ;
: restart-timer ( timer -- ) : restart-timer ( timer -- )
dup quotation-running?>> [ dup quotation-running?>> [