#ifndef UPTIME_H_ #define UPTIME_H_ #include "cmd.h" class Uptime; class UptimeCmd : public Cmd { public: UptimeCmd(Uptime *uptime); virtual String getCmdName() { return "UP"; } virtual String getHelp() { return "Uptime"; } virtual String exec(String params); private: Uptime *m_uptime; }; class Uptime { public: Uptime(); void begin(CmdServer *cmdServer); void exec(); uint8_t getSeconds() { return m_seconds; }; uint8_t getMinutes() { return m_minutes; }; uint8_t getHours() { return m_hours; }; uint16_t getDays() { return m_days; }; private: UptimeCmd m_uptimeCmd; uint8_t m_seconds; uint8_t m_minutes; uint8_t m_hours; uint16_t m_days; }; #endif /* TEST_H_ */