]> gitweb.factorcode.org Git - factor.git/commitdiff
document every, dt -> duration
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 4 Sep 2008 23:14:24 +0000 (18:14 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 4 Sep 2008 23:14:24 +0000 (18:14 -0500)
basis/alarms/alarms-docs.factor
basis/alarms/alarms.factor

index f07a8b9a2d925399591f4286d2a02edf70ce4c33..49480c0fe0941430d6442a7ec79fc2e4098537c3 100755 (executable)
@@ -9,13 +9,19 @@ HELP: add-alarm
 { $description "Creates and registers an alarm. If " { $snippet "frequency" } " is " { $link f } ", this will be a one-time alarm, otherwise it will fire with the given frequency. The quotation will be called from the alarm thread." } ;\r
 \r
 HELP: later\r
-{ $values { "quot" quotation } { "dt" duration } { "alarm" alarm } }\r
+{ $values { "quot" quotation } { "duration" duration } { "alarm" alarm } }\r
 { $description "Creates and registers an alarm which calls the quotation once at " { $snippet "time" } " from now." } ;\r
 \r
 HELP: cancel-alarm\r
 { $values { "alarm" alarm } }\r
 { $description "Cancels an alarm. Does nothing if the alarm is not active." } ;\r
 \r
+HELP: every\r
+{ $values\r
+     { "quot" quotation } { "duration" duration }\r
+     { "alarm" alarm } }\r
+{ $description "Creates and registers an alarm which calls the quotation repeatedly, using " { $snippet "dt" } " as the frequency." } ;\r
+\r
 ARTICLE: "alarms" "Alarms"\r
 "Alarms provide a lightweight way to schedule one-time and recurring tasks without spawning a new thread."\r
 { $subsection alarm }\r
index cbbebde579f149d4da1ca85d6997576e712c8879..7fdeca9ae6cc39e5bb8bcf5ced6cd65196aed3a0 100755 (executable)
@@ -82,10 +82,10 @@ PRIVATE>
 : add-alarm ( quot time frequency -- alarm )
     <alarm> [ register-alarm ] keep ;
 
-: later ( quot dt -- alarm )
+: later ( quot duration -- alarm )
     hence f add-alarm ;
 
-: every ( quot dt -- alarm )
+: every ( quot duration -- alarm )
     [ hence ] keep add-alarm ;
 
 : cancel-alarm ( alarm -- )