the device cycle duration in clock_periods. For example, at 44.1kHz and a buffer size of 512 frames, period = 512 when clock_period was 1.0/44100, or 512/44100 if clock_period was 1.

system_time, in seconds, should be the value of the system clock time, at (or as close as possible to) the moment the device hardware interrupt occurred (or any other event the device clock raises at the beginning of a cycle).