Standard system time functions.
This module contains standard time functions and formatters for printing. Note that Pebble only supports local time and does not support timezones.
Most of these functions are part of the C standard library which is documented at https://sourceware.org/newlib/libc.html#Timefns
struct tm * localtime | ( | const time_t * | clock) |
convert the time value pointed at by clock to a struct tm which contains the time adjusted for the local timezone
clock | A pointer to an object of type time_t that contains a time value |
time_t mktime | ( | struct tm * | timeptr) |
Convert the tm structure to a time_t value representing local time.
timeptr | The struct tm pointer for the time to be converted |
Format the time value at tm according to fmt and place the result in a buffer s of size max.
s | A preallocation char array of size max |
max | the size of the array s |
fmt | a formatting string |
tm | A pointer to a struct tm containing a broken out time value |
Obtain the number of seconds since the epoch.
Note that the epoch is adjusted for Timezones and Daylight Savings.
tloc | Optionally points to an address of a time_t variable to store the time in. If you only want to use the return value, you may pass NULL into tloc instead |
Obtain the number of seconds and milliseconds part since the epoch.
This is a non-standard C function provided for convenience.
tloc | Optionally points to an address of a time_t variable to store the time in. You may pass NULL into tloc if you don't need a time_t variable to be set with the seconds since the epoch |
out_ms | Optionally points to an address of a uint16_t variable to store the number of milliseconds since the last second in. If you only want to use the return value, you may pass NULL into out_ms instead |
time in seconds