ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
time_compat.h File Reference

Reentrant UTC broken-down time, portable across the host and target toolchains. More...

#include <time.h>
#include "protocore_config.h"

Go to the source code of this file.

Classes

struct  TimeCompatArgs
 The instant a conversion reads, and the storage it fills. More...
 
struct  TimeCompatVars
 
struct  TimeCompatNs
 The entries. More...
 

Functions

void protocore_time_compat_gmtime (uint8_t *work)
 

Variables

TimeCompatVars TimeCompatV
 The operands and the outcome.
 

Detailed Description

Reentrant UTC broken-down time, portable across the host and target toolchains.

Responses are formatted from worker threads, so every conversion must write into caller storage - never the shared static tm that gmtime() returns. The toolchains disagree on how to spell that: newlib and glibc have gmtime_r, the Windows CRT has only gmtime_s, with the arguments reversed. This is the one seam that hides the difference, so callers write it once.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file time_compat.h.

Function Documentation

◆ protocore_time_compat_gmtime()

void protocore_time_compat_gmtime ( uint8_t *  work)

Variable Documentation

◆ TimeCompatV

TimeCompatVars TimeCompatV
extern

The operands and the outcome.