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

Function fresh_tzdata

localtime.c:1826–1836  ·  view source on GitHub ↗

Return true if primary cached time zone data are fresh, i.e., if this function is known to have recently returned false. A call is recent if it occurred less than tz_change_interval seconds ago. NOW should be the current time. */

Source from the content-addressed store, hash-verified

1824 A call is recent if it occurred less than tz_change_interval seconds ago.
1825 NOW should be the current time. */
1826static bool
1827fresh_tzdata(monotime_t now)
1828{
1829 /* If nonzero, the time of the last false return. */
1830 static monotime_t last_checked;
1831
1832 if (last_checked && now - last_checked < tz_change_interval)
1833 return true;
1834 last_checked = now;
1835 return false;
1836}
1837
1838/* Initialize *SP to a value appropriate for the TZ setting NAME.
1839 Respect TZLOADFLAGS.

Callers 1

tzset_unlockedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected