From 4dcfefc0b9ed7bcbc68086cfedc8b8b9bda9a63c Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 23 Aug 2018 20:37:20 -0700 Subject: [PATCH] timers: simplify stop-timer. --- basis/timers/timers.factor | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/basis/timers/timers.factor b/basis/timers/timers.factor index 925fc246a7..029f640616 100644 --- a/basis/timers/timers.factor +++ b/basis/timers/timers.factor @@ -88,10 +88,8 @@ PRIVATE> : stop-timer ( timer -- ) dup quotation-running?>> [ - f >>thread drop - ] [ - [ [ interrupt ] when* f ] change-thread drop - ] if ; + dup thread>> [ interrupt ] when* + ] unless f >>thread drop ; : restart-timer ( timer -- ) dup quotation-running?>> [