Software implemented real time clock driven by a Ticker. No external hardware (like DS1307 or DS3231 or etc.) is needed. Should work on any mbed platform where Ticker works.

Dependents:   Clock_Hello

See demo:

Import programClock_Hello

Demo for the Clock library (real time clock driven by a Ticker).

Revision:
1:0668893c1c6f
Parent:
0:af43d5d263e7
Child:
3:58f5afbd24cd
--- a/Clock.h	Thu Apr 30 10:22:17 2015 +0000
+++ b/Clock.h	Sat Oct 24 11:19:24 2015 +0000
@@ -42,6 +42,7 @@
     Clock();
     void                set(int year, int mon, int mday, int hour, int min, int sec);
     void                set(tm& val);
+    void                set(time_t time);
     static time_t       time();
     int                 year(void);
     int                 mon(void);