diff --git a/libraries/AP_HAL/Util.h b/libraries/AP_HAL/Util.h index de76343f3b..42bfd27290 100644 --- a/libraries/AP_HAL/Util.h +++ b/libraries/AP_HAL/Util.h @@ -84,6 +84,20 @@ public: /* Support for an imu heating system */ virtual void set_imu_temp(float current) {} + /* + performance counter calls - wrapper around original PX4 interface + */ + enum perf_counter_type { + PC_COUNT, /**< count the number of times an event occurs */ + PC_ELAPSED, /**< measure the time elapsed performing an event */ + PC_INTERVAL /**< measure the interval between instances of an event */ + }; + typedef void *perf_counter_t; + virtual perf_counter_t perf_alloc(perf_counter_type t, const char *name) { return NULL; } + virtual void perf_begin(perf_counter_t h) {} + virtual void perf_end(perf_counter_t h) {} + virtual void perf_count(perf_counter_t h) {} + protected: // we start soft_armed false, so that actuators don't send any // values until the vehicle code has fully started