mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 10:53:34 +08:00
fix(lib/perf): Fully reset mean and M2 in perf_counter
This commit is contained in:
@@ -411,6 +411,8 @@ perf_reset(perf_counter_t handle)
|
||||
pce->time_total = 0;
|
||||
pce->time_least = 0;
|
||||
pce->time_most = 0;
|
||||
pce->mean = 0.0f;
|
||||
pce->M2 = 0.0f;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -422,6 +424,8 @@ perf_reset(perf_counter_t handle)
|
||||
pci->time_last = 0;
|
||||
pci->time_least = 0;
|
||||
pci->time_most = 0;
|
||||
pci->mean = 0.0f;
|
||||
pci->M2 = 0.0f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user