diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-03-03 10:32:01 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-03-03 10:32:01 +0100 |
commit | 5cefd4811f7913402baabf93939ed4fbf4727654 (patch) | |
tree | 5e97cf7a45c4c5b7fd6e01e05e2ec87bd2aaf2aa /src/modules/systemlib/perf_counter.h | |
parent | 7bb583d6e21a0fa7e51f147d23997aaeb7e218c9 (diff) | |
parent | 3dd3ba4637bfe6d665f20c1e5712ac22131b5b22 (diff) | |
download | px4-firmware-5cefd4811f7913402baabf93939ed4fbf4727654.tar.gz px4-firmware-5cefd4811f7913402baabf93939ed4fbf4727654.tar.bz2 px4-firmware-5cefd4811f7913402baabf93939ed4fbf4727654.zip |
Merged with master, cleanup of varlength prototypemavlink_variable_length
Diffstat (limited to 'src/modules/systemlib/perf_counter.h')
-rw-r--r-- | src/modules/systemlib/perf_counter.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/modules/systemlib/perf_counter.h b/src/modules/systemlib/perf_counter.h index 5c2cb15b2..e1e3cbe95 100644 --- a/src/modules/systemlib/perf_counter.h +++ b/src/modules/systemlib/perf_counter.h @@ -92,13 +92,25 @@ __EXPORT extern void perf_begin(perf_counter_t handle); * End a performance event. * * This call applies to counters that operate over ranges of time; PC_ELAPSED etc. + * If a call is made without a corresopnding perf_begin call, or if perf_cancel + * has been called subsequently, no change is made to the counter. * * @param handle The handle returned from perf_alloc. */ __EXPORT extern void perf_end(perf_counter_t handle); /** - * Reset a performance event. + * Cancel a performance event. + * + * This call applies to counters that operate over ranges of time; PC_ELAPSED etc. + * It reverts the effect of a previous perf_begin. + * + * @param handle The handle returned from perf_alloc. + */ +__EXPORT extern void perf_cancel(perf_counter_t handle); + +/** + * Reset a performance counter. * * This call resets performance counter to initial state * @@ -123,6 +135,14 @@ __EXPORT extern void perf_print_all(void); */ __EXPORT extern void perf_reset_all(void); +/** + * Return current event_count + * + * @param handle The counter returned from perf_alloc. + * @return event_count + */ +__EXPORT extern uint64_t perf_event_count(perf_counter_t handle); + __END_DECLS #endif |