Andrew Boyson / clock

Dependents:   oldheating gps motorhome heating

clock.h

Committer:
andrewboyson
Date:
2018-01-11
Revision:
17:927fc1eceb9d
Parent:
15:e6d1d763ca18
Child:
18:207dd1474cd9

File content as of revision 17:927fc1eceb9d:

#include <stdint.h>
#include <time.h>

extern void    ClockNsToTmUtc  (int64_t clk, struct tm* ptm);
extern int64_t ClockNsFromTmUtc(struct tm* ptm);

extern int ClockSlewDivisor      ;
extern int ClockSlewMaxMs        ;
extern int ClockPpbDivisor       ;
extern int ClockPpbChangeMax     ;
extern int ClockSyncedLimitNs    ;
extern int ClockSyncedLimitPpb   ;
extern int ClockSyncedHysterisNs ;
extern int ClockSyncedHysterisPpb;
extern int ClockMaxOffsetSecs    ;

extern int64_t ClockRefNs(void);
extern int     ClockIsSet(void);
extern int     ClockIsSynced(void);
extern int64_t ClockNowNs(void);
extern void    ClockTmLocal(struct tm* ptm);
extern void    ClockTmUtc  (struct tm* ptm);

extern int  ClockTicked;
extern void ClockInit(void);
extern void ClockMain(void);