| 161 | /////////////////////////////////////////// |
| 162 | |
| 163 | void system_execute(system_t *sys) { |
| 164 | if (sys == nullptr || sys->func_step == nullptr) return; |
| 165 | |
| 166 | // start timing |
| 167 | sys->profile_frame_start = stm_now(); |
| 168 | |
| 169 | sys->func_step(); |
| 170 | |
| 171 | // end timing |
| 172 | if (sys->profile_frame_duration == 0) |
| 173 | sys->profile_frame_duration = stm_since(sys->profile_frame_start); |
| 174 | sys->profile_step_duration += sys->profile_frame_duration; |
| 175 | sys->profile_step_count += 1; |
| 176 | sys->profile_frame_duration = 0; |
| 177 | } |
| 178 | |
| 179 | /////////////////////////////////////////// |
| 180 |
no test coverage detected