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@57:4daf2e423b27, 2019-02-21 (annotated)
- Committer:
- andrewboyson
- Date:
- Thu Feb 21 21:08:03 2019 +0000
- Revision:
- 57:4daf2e423b27
- Parent:
- 54:a3c018ceca77
- Child:
- 58:ad2bfd0345de
Two changes: defined typedef for clktime from int64_t; created new typedef time64 from int64_t to replace time_t to avoid the 2038 problem.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 37:330b844f54b6 | 1 | #include <stdint.h> |
andrewboyson | 26:0421132e6eaf | 2 | #include <time.h> |
andrewboyson | 26:0421132e6eaf | 3 | |
andrewboyson | 37:330b844f54b6 | 4 | #include "tm.h" |
andrewboyson | 37:330b844f54b6 | 5 | #include "clktime.h" |
andrewboyson | 54:a3c018ceca77 | 6 | #include "clkutc.h" |
andrewboyson | 26:0421132e6eaf | 7 | |
andrewboyson | 57:4daf2e423b27 | 8 | void ClkTimeToTmLocal(clktime time, struct tm* ptm) { TmLocalFromTimeT(ClkUtcFromTai(time) >> CLK_TIME_ONE_SECOND_SHIFT, ptm); } |
andrewboyson | 57:4daf2e423b27 | 9 | void ClkTimeToTmUtc (clktime time, struct tm* ptm) { TmUtcFromTimeT(ClkUtcFromTai(time) >> CLK_TIME_ONE_SECOND_SHIFT, ptm); } |
andrewboyson | 57:4daf2e423b27 | 10 | clktime ClkTimeFromTmUtc( struct tm* ptm) { return ClkUtcToTai(((clktime)TmUtcToTimeT(ptm)) << CLK_TIME_ONE_SECOND_SHIFT) ; } |