Remove unused code and trim variable allocs

This commit is contained in:
Daniel Öster 2025-01-08 18:31:00 +02:00
parent 77d83e5eb1
commit b6d7217036
4 changed files with 6 additions and 20 deletions

View file

@ -59,19 +59,15 @@ unsigned long uptime::m_remaining_days = 0;
//private variables that in combination hold the actual time passed
//Use the coresponding uptime::get_.... to read these private variables
unsigned long uptime::m_mod_milliseconds;
unsigned long uptime::m_mod_seconds;
unsigned long uptime::m_mod_minutes;
unsigned long uptime::m_mod_hours;
uint8_t uptime::m_mod_seconds;
uint8_t uptime::m_mod_minutes;
uint8_t uptime::m_mod_hours;
uptime::uptime()
{
}
/**** get the actual time passed from device boot time ****/
unsigned long uptime::getMilliseconds()
{
return uptime::m_mod_milliseconds;
}
unsigned long uptime::getSeconds()
{
return uptime::m_mod_seconds;

View file

@ -47,7 +47,6 @@ class uptime
static void calculateUptime();
static unsigned long getMilliseconds();
static unsigned long getSeconds();
static unsigned long getMinutes();
static unsigned long getHours();
@ -61,9 +60,9 @@ class uptime
static unsigned long m_days;
static unsigned long m_mod_milliseconds;
static unsigned long m_mod_seconds;
static unsigned long m_mod_minutes;
static unsigned long m_mod_hours;
static uint8_t m_mod_seconds;
static uint8_t m_mod_minutes;
static uint8_t m_mod_hours;
static unsigned long m_last_milliseconds;
static unsigned long m_remaining_seconds;

View file

@ -36,11 +36,3 @@ String uptime_formatter::getUptime()
(String)(uptime::getMinutes()) + " minutes, " +
(String)(uptime::getSeconds()) + " seconds";
}
//returns the actual time passed since device boot
//in the format: x days, y hours, z minutes, s seconds, n milliseconds
String uptime_formatter::getUptimeWithMillis()
{
return uptime_formatter::getUptime() + ", " +
(String)(uptime::getMilliseconds()) + " milliseconds";
}

View file

@ -31,6 +31,5 @@ class uptime_formatter
uptime_formatter();
static String getUptime();
static String getUptimeWithMillis();
};
#endif