Example
SYS_FILE logfd;
char *logmsg = "An error occurred.";
system_fwrite_atomic(logfd, logmsg, strlen(logmsg));
See also
system_errmsg, system_fopenRO, system_fopenRW, system_fopenWA,
system_lseek, system_fread, system_fwrite, system_flock,
system_ulock, system_fclose
system_gmtime
The
system_gmtime
function. It returns the current time adjusted to Greenwich Mean Time.
Syntax
struct tm *system_gmtime(const time_t *tp, const struct tm *res);
Returns
A pointer to a calendar time (
your system, the pointer may point to the data item represented by the second
parameter, or it may point to a statically-allocated item. For portability, do not
assume either situation.
Parameters
is an arithmetic time.
time_t *tp
is a pointer to a calendar time (
tm *res
Example
time_t tp;
struct tm res, *resp;
tp = time(NULL);
resp = system_gmtime(&tp, &res);
See also
system_localtime, util_strftime
system_localtime
The
system_localtime
function. It returns the current time in the local time zone.
localtime
function is a thread-safe version of the standard
) structure containing the GMT time. Depending on
tm
tm
function is a thread-safe version of the standard
NSAPI Functions (in Alphabetical Order)
) structure.
Chapter 5
NSAPI Function Reference
gmtime
183