MCPcopy Create free account
hub / github.com/eggert/tz / time

Function time

localtime.c:3148–3163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3146 to sys_time invokes the underlying system's 'time' function. */
3147
3148time_t
3149time(time_t *p)
3150{
3151 time_t r = sys_time(NULL);
3152 if (r != (time_t) -1) {
3153 iinntt offset = EPOCH_LOCAL ? timezone : 0;
3154 if (offset < IINNTT_MIN + EPOCH_OFFSET
3155 || increment_overflow_time_iinntt(&r, offset - EPOCH_OFFSET)) {
3156 errno = EOVERFLOW;
3157 r = -1;
3158 }
3159 }
3160 if (p)
3161 *p = r;
3162 return r;
3163}
3164
3165# endif
3166#endif

Callers 4

mainFunction · 0.85
get_rand_u64Function · 0.85
mainFunction · 0.85
sys_timeFunction · 0.85

Calls 2

sys_timeFunction · 0.85

Tested by

no test coverage detected