Deprecate public variable `CycleTimeReport::average_loop_time`

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1192/head
Michael Richters 3 years ago
parent d476508e26
commit 041543a0b3
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -21,6 +21,15 @@
#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/event_handler_result.h" // for EventHandlerResult
#include "kaleidoscope/plugin.h" // for Plugin #include "kaleidoscope/plugin.h" // for Plugin
// -----------------------------------------------------------------------------
// Deprecation warning messages
#include "kaleidoscope_internal/deprecations.h" // for DEPRECATED
#define _DEPRECATED_MESSAGE_CYCLETIMEREPORT_AVG_TIME \
"The `CycleTimeReport.average_loop_time` variable is deprecated. See\n" \
"the current documentation for CycleTimeReport for details.\n" \
"This variable will be removed after 2022-09-01."
// -----------------------------------------------------------------------------
namespace kaleidoscope { namespace kaleidoscope {
namespace plugin { namespace plugin {
@ -32,7 +41,10 @@ class CycleTimeReport : public kaleidoscope::Plugin {
EventHandlerResult beforeEachCycle(); EventHandlerResult beforeEachCycle();
EventHandlerResult afterEachCycle(); EventHandlerResult afterEachCycle();
#ifndef NDEPRECATED
DEPRECATED(CYCLETIMEREPORT_AVG_TIME)
static uint32_t average_loop_time; static uint32_t average_loop_time;
#endif
private: private:
static uint16_t last_report_time_; static uint16_t last_report_time_;

Loading…
Cancel
Save