Give API to get non-buggy time (millis_64()) #3318
-
Describe your core improvementI’m trying to obtain the current timestamp at a specific time t1, and check for its validity later at t2 by making sure t2-t1<max_delay. I know of millis(), but I want a more reasonable version that won’t do crazy things like wraparound on the int32 and consider my things “recent” after 49.7 days because of the overflow. Something like in the scheduler, using an int64: Blaming esphome/esphome/core/scheduler.cpp at d3592c451bc8570419126c8d753ec05ff5c8d55e · esphome/esphome · GitHub Current limitationsCurrently that method of the scheduler is private, so I can’t access it via Technical benefitsEasily get a reasonable |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
https://community.home-assistant.io/t/how-to-get-current-non-buggy-time-millis-64/930391/2?u=ten |
Beta Was this translation helpful? Give feedback.
https://community.home-assistant.io/t/how-to-get-current-non-buggy-time-millis-64/930391/2?u=ten