Andrew Boyson / clock

Dependents:   oldheating gps motorhome heating

Revision:
46:d3d56cb47940
Parent:
41:8cd859cd1475
Child:
54:a3c018ceca77
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/clk/clktm.c	Tue Jan 08 14:06:41 2019 +0000
@@ -0,0 +1,9 @@
+#include <stdint.h>
+#include <time.h>
+
+#include "tm.h"
+#include "clktime.h"
+
+void    ClkTimeToTmLocal(int64_t time, struct tm* ptm) {               TmLocalFromTimeT(time >> CLK_TIME_ONE_SECOND_SHIFT, ptm); }
+void    ClkTimeToTmUtc  (int64_t time, struct tm* ptm) {                 TmUtcFromTimeT(time >> CLK_TIME_ONE_SECOND_SHIFT, ptm); }
+int64_t ClkTimeFromTmUtc(              struct tm* ptm) { return ((int64_t)TmUtcToTimeT(ptm)) << CLK_TIME_ONE_SECOND_SHIFT      ; }
\ No newline at end of file