]> gitweb.factorcode.org Git - factor.git/commitdiff
timers-docs: fix wording in an article
authorAlexander Ilin <alex.ilin@protonmail.com>
Wed, 16 Aug 2023 11:28:54 +0000 (13:28 +0200)
committerAlexander Ilin <alex.ilin@protonmail.com>
Wed, 16 Aug 2023 11:28:54 +0000 (13:28 +0200)
basis/timers/timers-docs.factor

index cc1d8e28c73d01228d4df80b4a88d98dcdbd177b..35e7a2aca230fb5360943c473fa47e71f9d3e436 100644 (file)
@@ -51,7 +51,7 @@ HELP: delayed-every
 } ;
 
 ARTICLE: "timers" "Timers"
-"The " { $vocab-link "timers" } " vocabulary provides a lightweight way to schedule one-time and recurring tasks. Timers run in a single green thread per timer and consist of a quotation, a delay duration, and an interval duration. After starting a timer, the timer thread sleeps for the delay duration and calls the quotation. Then it waits out the interval duration and calls the quotation again until something stops the timer. If a recurring timer's quotation would be scheduled to run again before the previous quotation has finished processing, the timer will be run again immediately afterwards. This may result in the timer falling behind indefinitely, in which case the it will run as often as possible while still allowing other green threads to run. Recurring timers that execute 'on time' or 'catch up' will always be scheduled for an exact multiple of the interval from the original starting time to prevent the timer from drifting over time. Timers use " { $link nano-count } " as the timing primitive, so they will continue to work across system clock changes." $nl
+"The " { $vocab-link "timers" } " vocabulary provides a lightweight way to schedule one-time and recurring tasks. Timers run in a single green thread per timer and consist of a quotation, a delay duration, and an interval duration. After starting a timer, the timer thread sleeps for the delay duration and calls the quotation. Then it waits out the interval duration and calls the quotation again until something stops the timer. If a recurring timer's quotation would be scheduled to run again before the previous quotation has finished processing, the timer will be run again immediately afterwards. This may result in the timer falling behind indefinitely, in which case it will run as often as possible while still allowing other green threads to run. Recurring timers that execute 'on time' or 'catch up' will always be scheduled for an exact multiple of the interval from the original starting time to prevent the timer from drifting over time. Timers use " { $link nano-count } " as the timing primitive, so they will continue to work across system clock changes." $nl
 "The timer class:"
 { $subsections timer }
 "Create a timer before starting it:"