Indicate a pause/expected discontinuity in processing the element */
| 114 | |
| 115 | /** Indicate a pause/expected discontinuity in processing the element */ |
| 116 | void AddPause(TimingMeasurement start_time) |
| 117 | { |
| 118 | if (this->durations[this->prev_index] != INVALID_DURATION) { |
| 119 | this->timestamps[this->next_index] = start_time; |
| 120 | this->durations[this->next_index] = INVALID_DURATION; |
| 121 | this->prev_index = this->next_index; |
| 122 | this->next_index += 1; |
| 123 | if (this->next_index >= NUM_FRAMERATE_POINTS) this->next_index = 0; |
| 124 | this->num_valid += 1; |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | /** Get average cycle processing time over a number of data points */ |
| 129 | double GetAverageDurationMilliseconds(int count) |