The (only) correct way to compute the period over multiple cycles is to add up the periods of the individual cycles.  The 'period' values come from the monotonic clock, so they are the only correct way to measure the total period over multiple cycles. The 'time' is the best approximation of the system time, and is not monotonic; it can be adjusted at runtime to stay synchronized with the actual world time. 

If you modify the implementation to create a sum of periods (which is the only correct way to implement this), there's no special case needed for update_every_n_cycles == 1. So you just keep adding the period to the sum of periods, until the number of periods equals update_every_n_cycles.