Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
clk/clktm.c
- Committer:
- andrewboyson
- Date:
- 2019-02-21
- Revision:
- 57:4daf2e423b27
- Parent:
- 54:a3c018ceca77
- Child:
- 58:ad2bfd0345de
File content as of revision 57:4daf2e423b27:
#include <stdint.h> #include <time.h> #include "tm.h" #include "clktime.h" #include "clkutc.h" void ClkTimeToTmLocal(clktime time, struct tm* ptm) { TmLocalFromTimeT(ClkUtcFromTai(time) >> CLK_TIME_ONE_SECOND_SHIFT, ptm); } void ClkTimeToTmUtc (clktime time, struct tm* ptm) { TmUtcFromTimeT(ClkUtcFromTai(time) >> CLK_TIME_ONE_SECOND_SHIFT, ptm); } clktime ClkTimeFromTmUtc( struct tm* ptm) { return ClkUtcToTai(((clktime)TmUtcToTimeT(ptm)) << CLK_TIME_ONE_SECOND_SHIFT) ; }