From 2253c912c86b5196e17657ee067abfc7afa4d652 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 11 Dec 2017 10:28:25 +0100 Subject: Add basic uptime getter, improve loop support --- include/esp8266/driver/uptime.h | 17 +++++++++++++++++ include/msp430fr5969lp/driver/uptime.h | 17 +++++++++++++++++ include/posix/driver/uptime.h | 17 +++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 include/esp8266/driver/uptime.h create mode 100644 include/msp430fr5969lp/driver/uptime.h create mode 100644 include/posix/driver/uptime.h (limited to 'include') diff --git a/include/esp8266/driver/uptime.h b/include/esp8266/driver/uptime.h new file mode 100644 index 0000000..7da10cb --- /dev/null +++ b/include/esp8266/driver/uptime.h @@ -0,0 +1,17 @@ +#ifndef UPTIME_H +#define UPTIME_H + +#include "c_types.h" + +class Uptime { + private: + Uptime(const Uptime ©); + + public: + Uptime () {} + uint32_t get(); +}; + +extern Uptime uptime; + +#endif diff --git a/include/msp430fr5969lp/driver/uptime.h b/include/msp430fr5969lp/driver/uptime.h new file mode 100644 index 0000000..f18a7fe --- /dev/null +++ b/include/msp430fr5969lp/driver/uptime.h @@ -0,0 +1,17 @@ +#ifndef UPTIME_H +#define UPTIME_H + +#include + +class Uptime { + private: + Uptime(const Uptime ©); + + public: + Uptime () {} + uint32_t get(); +}; + +extern Uptime uptime; + +#endif diff --git a/include/posix/driver/uptime.h b/include/posix/driver/uptime.h new file mode 100644 index 0000000..c92ccf1 --- /dev/null +++ b/include/posix/driver/uptime.h @@ -0,0 +1,17 @@ +#ifndef UPTIME_H +#define UPTIME_H + +#include + +class Uptime { + private: + Uptime(const Uptime ©); + + public: + Uptime () {} + uint64_t get(); +}; + +extern Uptime uptime; + +#endif -- cgit v1.2.3