Files
MuditaOS/module-sys/Service/TimerMessage.hpp
Adam f5f27d642f EGD-2955 EGD-3588 Timers fully refactored & updated (#721)
* Timers now are Application thread safe
* Timers now have consistent API independend of Application (no more c style timers)
* Timers can have either: callback or override onTimer() method - this
  way we can create more complicated timers or just use existing ones
* gui::Timer added via adapter class GuiTimer to decouple sys::Timer
  with gui::Timer
* Fixed race in wrapper
* Updated docs
* fixed using std and cpp_freertos and DataReceivedHandler hidden in Application.hpp
2020-10-02 14:04:57 +02:00

26 lines
470 B
C++

#pragma once
#include "Message.hpp"
namespace sys
{
class Timer;
class TimerMessage : public SystemMessage
{
Timer *timer = nullptr;
public:
TimerMessage(Timer *timer) : SystemMessage(SystemMessageType::Timer, ServicePowerMode::Active), timer(timer)
{
type = Type::System;
}
[[nodiscard]] auto getTimer() const -> Timer *
{
return timer;
}
};
} // namespace sys