run_periodic
time.Clock.run_periodic
Precondition
pre debug: period.is_infinity || period.as_duration > time.duration.ns 0
Postcondition
post debug: ((last >= first): result <= ((last - first) / period.as_duration) + 1) debug: ((last < first): result = 0)
Type Parameters
0.095dev (GIT hash 09dff08de289bbb6f7136c7e2f8c66dcc1856bba)
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.