Andrew Boyson / clock

Dependents:   oldheating gps motorhome heating

Committer:
andrewboyson
Date:
Thu Jan 25 07:54:54 2018 +0000
Revision:
26:0421132e6eaf
Changed ticks from a count of ns to a fixed fraction of 30bits. This makes it much easier to convert to and from NTP and time_t

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 26:0421132e6eaf 1 #include <time.h>
andrewboyson 26:0421132e6eaf 2 #include <stdint.h>
andrewboyson 26:0421132e6eaf 3
andrewboyson 26:0421132e6eaf 4 extern void TimeTmUtcToLocal(struct tm* ptm);
andrewboyson 26:0421132e6eaf 5
andrewboyson 26:0421132e6eaf 6 extern void TimeAsciiDateTimeToTm(const char* pDate, const char* pTime, struct tm* ptm);
andrewboyson 26:0421132e6eaf 7 extern void TimeToTmLocal(uint32_t time, struct tm* ptm);
andrewboyson 26:0421132e6eaf 8 extern void TimeToTmUtc(uint32_t time, struct tm* ptm);
andrewboyson 26:0421132e6eaf 9
andrewboyson 26:0421132e6eaf 10 extern time_t TimeFromTmUtc(struct tm* ptm);
andrewboyson 26:0421132e6eaf 11 extern int TimePeriodBetween(struct tm* ptmLater, struct tm* ptmEarlier);