mirror of
https://github.com/esphome/esphome.git
synced 2025-01-28 22:42:28 +01:00
Update real_time_clock.h
This commit is contained in:
parent
34cce0e920
commit
21ed68fb18
@ -36,6 +36,7 @@ class RealTimeClock : public PollingComponent {
|
|||||||
time_t timestamp_now() { return ::time(nullptr); }
|
time_t timestamp_now() { return ::time(nullptr); }
|
||||||
|
|
||||||
void call_setup() override;
|
void call_setup() override;
|
||||||
|
void apply_timezone_();
|
||||||
|
|
||||||
void add_on_time_sync_callback(std::function<void()> callback) {
|
void add_on_time_sync_callback(std::function<void()> callback) {
|
||||||
this->time_sync_callback_.add(std::move(callback));
|
this->time_sync_callback_.add(std::move(callback));
|
||||||
@ -46,7 +47,6 @@ class RealTimeClock : public PollingComponent {
|
|||||||
void synchronize_epoch_(uint32_t epoch);
|
void synchronize_epoch_(uint32_t epoch);
|
||||||
|
|
||||||
std::string timezone_{};
|
std::string timezone_{};
|
||||||
void apply_timezone_();
|
|
||||||
|
|
||||||
CallbackManager<void()> time_sync_callback_;
|
CallbackManager<void()> time_sync_callback_;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user