Add timespec_{read,write}_file() and unit tests
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "mgos.h"
|
||||
#include <unistd.h>
|
||||
|
||||
/* A simple time specifier for windows of time throughout a 24 hour day.
|
||||
*
|
||||
@ -47,3 +48,7 @@ bool timespec_clear_spec(struct mgos_timespec *ts);
|
||||
bool timespec_get_spec(struct mgos_timespec *ts, char *ret, int retlen);
|
||||
bool timespec_match(const struct mgos_timespec *ts, const struct tm *tm);
|
||||
bool timespec_match_now(const struct mgos_timespec *ts);
|
||||
|
||||
// File IO -- read or write the current timespec to a file
|
||||
bool timespec_write_file(struct mgos_timespec *ts, const char *fn);
|
||||
bool timespec_read_file(struct mgos_timespec *ts, const char *fn);
|
||||
|
Reference in New Issue
Block a user