diff --git a/Software/src/devboard/webserver/events_html.cpp b/Software/src/devboard/webserver/events_html.cpp index 1b6f7573..f3dab890 100644 --- a/Software/src/devboard/webserver/events_html.cpp +++ b/Software/src/devboard/webserver/events_html.cpp @@ -16,6 +16,8 @@ button:hover { background-color: #3A4A52; } )====="; +uint64_t get_timestamp(unsigned long currentMillis); + static std::vector order_events; String events_processor(const String& var) { @@ -37,9 +39,7 @@ String events_processor(const String& var) { } // Sort events by timestamp std::sort(order_events.begin(), order_events.end(), compareEventsByTimestampDesc); - uint64_t current_timestamp = - (uint64_t)datalayer.system.status.millisrolloverCount * (uint64_t)std::numeric_limits::max() + - (uint64_t)millis(); + uint64_t current_timestamp = get_timestamp(millis()); // Generate HTML and debug output for (const auto& event : order_events) {