diff --git a/marlin2.cpp b/marlin2.cpp index 5e55756..8af5937 100644 --- a/marlin2.cpp +++ b/marlin2.cpp @@ -252,8 +252,8 @@ namespace esphome { } } - current = ((*d)*24*60*60) + ((*h)*60*60) + ((*m)*60) + (*s); - return 1; + *current = (unsigned long) round(((*d)*24*60*60) + ((*h)*60*60) + ((*m)*60) + (*s)); + return 1; } } // namespace esphome \ No newline at end of file