MCPcopy Create free account
hub / github.com/GrapheneCt/NetStream / initbase

Function initbase

NetStream/source/ftpparse.c:93–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93static void initbase(void)
94{
95 struct tm *t;
96 if (!flagneedbase) return;
97
98 base = 0;
99 t = libc_gmtime(&base);
100 base = -(totai(t->tm_year + 1900,t->tm_mon,t->tm_mday) + t->tm_hour * 3600 + t->tm_min * 60 + t->tm_sec);
101 /* assumes the right time_t, counting seconds. */
102 /* base may be slightly off if time_t counts non-leap seconds. */
103 flagneedbase = 0;
104}
105
106static void initnow(void)
107{

Callers 2

initnowFunction · 0.85
ftpparseFunction · 0.85

Calls 2

libc_gmtimeFunction · 0.85
totaiFunction · 0.85

Tested by

no test coverage detected