ADD measure time call
This commit is contained in:
@@ -31,9 +31,15 @@
|
||||
|
||||
namespace multi_tasking {
|
||||
|
||||
typedef struct gearMail {
|
||||
uint8_t gear;
|
||||
std::chrono::microseconds callTime;
|
||||
} gearMail_t;
|
||||
|
||||
class GearDevice {
|
||||
public:
|
||||
explicit GearDevice(Mail<uint8_t, 16>* mailBox); // NOLINT(runtime/references)
|
||||
explicit GearDevice(Mail<gearMail_t, 16>* mailBox,
|
||||
Timer& timer); // NOLINT(runtime/references)
|
||||
|
||||
// make the class non copyable
|
||||
GearDevice(GearDevice&) = delete;
|
||||
@@ -48,7 +54,8 @@ class GearDevice {
|
||||
private:
|
||||
// data members
|
||||
volatile uint8_t _currentGear = bike_computer::kMinGear;
|
||||
Mail<uint8_t, 16>* _mailBox;
|
||||
Mail<gearMail_t, 16>* _mailBox;
|
||||
Timer& _timer;
|
||||
};
|
||||
|
||||
} // namespace multi_tasking
|
||||
|
||||
Reference in New Issue
Block a user