MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / AddPause

Method AddPause

src/framerate_gui.cpp:116–126  ·  view source on GitHub ↗

Indicate a pause/expected discontinuity in processing the element */

Source from the content-addressed store, hash-verified

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)

Callers 1

PausedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected