Begin an accumulation of multiple measurements into a single value, from a given start time */
| 94 | |
| 95 | /** Begin an accumulation of multiple measurements into a single value, from a given start time */ |
| 96 | void BeginAccumulate(TimingMeasurement start_time) |
| 97 | { |
| 98 | this->timestamps[this->next_index] = this->acc_timestamp; |
| 99 | this->durations[this->next_index] = this->acc_duration; |
| 100 | this->prev_index = this->next_index; |
| 101 | this->next_index += 1; |
| 102 | if (this->next_index >= NUM_FRAMERATE_POINTS) this->next_index = 0; |
| 103 | this->num_valid = std::min(NUM_FRAMERATE_POINTS, this->num_valid + 1); |
| 104 | |
| 105 | this->acc_duration = 0; |
| 106 | this->acc_timestamp = start_time; |
| 107 | } |
| 108 | |
| 109 | /** Accumulate a period onto the current measurement */ |
| 110 | void AddAccumulate(TimingMeasurement duration) |