|
Open Garden
0.10.1-21
|
time high level functions. More...


Go to the source code of this file.
Functions | |
| void | date_set (char *cmd, struct debug_t *debug) |
| void | date_setrtc (char *cmd) |
| struct tm * | date_init (struct tm *tm_clock, struct debug_t *debug) |
| void | date_free (struct tm *tm_clock) |
| void | date_rtc (struct debug_t *debug) |
| void | date (struct debug_t *debug) |
| void | date_hwclock_start (void) |
| void | date_hwclock_stop (void) |
| uint8_t | date_timetorun (struct tm *tm_clock, struct debug_t *debug) |
| check if it is the time to run a program. More... | |
time high level functions.
| void date | ( | struct debug_t * | debug | ) |
print the current time
| void date_free | ( | struct tm * | tm_clock | ) |
free the allocated structure
| void date_hwclock_start | ( | void | ) |
start the hardware clock now, high level call to rtc start.
| void date_hwclock_stop | ( | void | ) |
stop the hardware clock
| void date_rtc | ( | struct debug_t * | debug | ) |
print the current rtc time
| void date_set | ( | char * | cmd, |
| struct debug_t * | debug | ||
| ) |
Set the date from the command line in a human form.
| cmd | the string in the format YYYYMMDDhhmm. |
| debug | printing and string stuff. |
| void date_setrtc | ( | char * | cmd | ) |
Extract abstime from the command and set it to the RTC clock
check if it is the time to run a program.
Every time date_timetorun is called, it has stored in a static variable the last time as minute we activate a check trough all the programs to see if some has to start or to stop. If the time (minutes) are the same stored, then for this minute we are done and exit, else, if for this minute we did not check the programs list, do it.
| *tm_clock | The time. |
| debug |
static store at which last time (minutes) we run programs, needed to avoid re-execution of programs in the same minute.
1.8.13