Collect a complete measurement, given start and ending times for a processing block */
| 83 | |
| 84 | /** Collect a complete measurement, given start and ending times for a processing block */ |
| 85 | void Add(TimingMeasurement start_time, TimingMeasurement end_time) |
| 86 | { |
| 87 | this->durations[this->next_index] = end_time - start_time; |
| 88 | this->timestamps[this->next_index] = start_time; |
| 89 | this->prev_index = this->next_index; |
| 90 | this->next_index += 1; |
| 91 | if (this->next_index >= NUM_FRAMERATE_POINTS) this->next_index = 0; |
| 92 | this->num_valid = std::min(NUM_FRAMERATE_POINTS, this->num_valid + 1); |
| 93 | } |
| 94 | |
| 95 | /** Begin an accumulation of multiple measurements into a single value, from a given start time */ |
| 96 | void BeginAccumulate(TimingMeasurement start_time) |
no outgoing calls
no test coverage detected