Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

run_periodic

time.Clock.run_periodic

(P 
type
:
time.Period, first time.instant, period P, last time.instant, code Function unit)
 => 
u64
run the given `code` periodically at time `first+p*0`, `first+p*1`, `first+p*2`,
etc. until this clock has reached the time `last`.

In case any of the instants `first+p*0`, `first+p*1`, `first+p*2`, etc. happen to
be in the past when this is called or after the previous execution of `code`,
respectively, do not run `code` for that instant.

In case `period.is_infinity`, run `code` once unless `first > last`.

return the number of times the `code` was run.

Type Parameters

0.095dev (2025-09-09 14:29:31 GIT hash 98644f8f651c2101a0730cfe31c5807993b7603b built by fridi@fzen)